A libp2p stream muxer

Hierarchy

Properties

close: ((err?: Error) => void)

Type declaration

    • (err?: Error): void
    • Close or abort all tracked streams and stop the muxer

      Parameters

      Returns void

newStream: ((name?: string) => Stream | Promise<Stream>)

Type declaration

    • (name?: string): Stream | Promise<Stream>
    • Initiate a new stream with the given name. If no name is provided, the id of the stream will be used.

      Parameters

      • Optional name: string

      Returns Stream | Promise<Stream>

protocol: string

The protocol used to select this muxer during connection opening

streams: Stream[]

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