A libp2p stream muxer

interface StreamMuxer {
    protocol: string;
    sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
    source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
    streams: Stream[];
    abort(err): void;
    close(options?): Promise<void>;
    newStream(name?): Stream | Promise<Stream>;
}

Hierarchy

Properties

protocol: string

The protocol used to select this muxer during connection opening

sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>
source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>
streams: Stream[]

A list of streams that are currently open. Closed streams will not be returned.

Methods