@chainsafe/libp2p-yamux
    Preparing search index...

    Interface YamuxStreamInit

    interface YamuxStreamInit {
        closeTimeout?: number;
        config: Config;
        direction: Direction;
        id: string;
        log: Logger;
        metadata?: Record<string, unknown>;
        name?: string;
        sendCloseWriteTimeout?: number;
        state: StreamState;
        getRTT(): number;
        onAbort(err: Error): void;
        onCloseRead(): void;
        onCloseWrite(): void;
        onEnd(err?: Error): void;
        onReset(): void;
        sendFrame(header: FrameHeader, body?: Uint8ArrayList): void;
    }

    Hierarchy

    Index

    Properties

    closeTimeout?: number

    How long to wait in ms for stream data to be written to the underlying connection when closing the writable end of the stream.

    500
    
    config: Config
    direction: Direction

    The stream direction

    id: string

    A unique identifier for this stream

    log: Logger

    A Logger implementation used to log stream-specific information

    metadata?: Record<string, unknown>

    User specific stream metadata

    name?: string
    sendCloseWriteTimeout?: number

    After the stream sink has closed, a limit on how long it takes to send a close-write message to the remote peer.

    Methods

    • Invoked when the stream has errored

      Parameters

      Returns void

    • Invoked when the readable end of the stream is closed

      Returns void

    • Invoked when the writable end of the stream is closed

      Returns void

    • Invoked when the stream ends

      Parameters

      Returns void

    • Invoked when the stream has been reset by the remote

      Returns void