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

    Interface YamuxMuxerInit

    interface YamuxMuxerInit {
        direction?: Direction;
        enableKeepAlive?: boolean;
        initialStreamWindowSize?: number;
        keepAliveInterval?: number;
        maxInboundStreams?: number;
        maxMessageSize?: number;
        maxOutboundStreams?: number;
        maxStreamWindowSize?: number;
        onIncomingStream(stream: Stream): void;
        onStreamEnd(stream: Stream): void;
    }

    Hierarchy

    Index

    Properties

    direction?: Direction

    Outbound stream muxers are opened by the local node, inbound stream muxers are opened by the remote

    enableKeepAlive?: boolean

    Used to do periodic keep alive messages using a ping.

    initialStreamWindowSize?: number

    Used to control the initial window size that we allow for a stream.

    measured in bytes

    keepAliveInterval?: number

    How often to perform the keep alive

    measured in milliseconds

    maxInboundStreams?: number

    Maximum number of concurrent inbound streams that we accept. If the peer tries to open more streams, those will be reset immediately.

    maxMessageSize?: number

    Maximum size of a message that we'll send on a stream. This ensures that a single stream doesn't hog a connection.

    maxOutboundStreams?: number

    Maximum number of concurrent outbound streams that we accept. If the application tries to open more streams, the call to newStream will throw

    maxStreamWindowSize?: number

    Used to control the maximum window size that we allow for a stream.

    Methods

    • A callback function invoked every time an incoming stream is opened

      Parameters

      Returns void

    • A callback function invoke every time a stream ends

      Parameters

      Returns void