The protocol used to select this muxer during connection opening
The status of the muxer
A list of streams that are currently open
Immediately close the muxer, abort every open stream and discard any unsent/unread data.
Add a listener for an event
Optionaloptions: boolean | AddEventListenerOptionsGracefully close the muxer. All open streams will be gracefully closed, and the returned promise will either resolve when any/all unsent data has been sent, or it will reject if the passed abort signal fires before this happens.
Optionaloptions: AbortOptionsThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Returns the number of listeners for the event type
Remove a listener previously registered for an event
Optionallistener: EventHandler<StreamMuxerEvents<MuxedStream>[K]> | nullOptionaloptions: boolean | EventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionallistener: EventHandler<Event>Optionaloptions: boolean | EventListenerOptionsType-safe version of EventTarget.dispatchEvent - only events from the event map are supported.
Attempting to dispatch an unsupported event results in a TypeScript compilation error.
Optionaldetail: CustomEventInit<Detail>
A libp2p stream muxer