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

    Interface YamuxStreamInit

    interface YamuxStreamInit {
        direction?: MessageStreamDirection;
        id: string;
        inactivityTimeout?: number;
        initialStreamWindowSize?: number;
        log: Logger;
        maxMessageSize?: number;
        maxReadBufferLength?: number;
        maxStreamWindowSize?: number;
        maxWriteBufferLength?: number;
        protocol?: string;
        state: StreamState;
        streamId: number;
        getRTT(): number;
        sendFrame(header: FrameHeader, body?: Uint8ArrayList): boolean;
    }

    Hierarchy

    Index

    Properties

    The stream direction

    id: string

    A unique identifier for this stream

    inactivityTimeout?: number

    If no data is sent or received in this number of ms the stream will be reset and an 'error' event emitted.

    120_000
    
    initialStreamWindowSize?: number
    log: Logger

    A Logger implementation used to log stream-specific information

    maxMessageSize?: number

    By default all available bytes are passed to the sendData method of extending classes, if smaller chunks are required, pass a value here.

    maxReadBufferLength?: number

    The maximum number of bytes to store when paused or before a 'message' event handler is added.

    If the internal buffer overflows this value the stream will be reset.

    4_194_304
    
    maxStreamWindowSize?: number
    maxWriteBufferLength?: number

    The maximum number of bytes to store when the remote end of the stream is applying backpressure, or when it is slow to accept new bytes.

    If the internal buffer overflows this value the stream will be reset.

    Infinity
    
    protocol?: string

    The protocol name for the stream, if it is known

    streamId: number

    Methods