libp2p
    Preparing search index...

    Interface StreamMuxer

    A libp2p stream muxer

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

    Hierarchy

    Index

    Properties

    protocol: string

    The protocol used to select this muxer during connection opening

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

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

    Methods