A duplex iterable stream to listen on
A list of protocols (or single protocol) that this listener is able to speak.
an options object containing an AbortSignal and an optional boolean writeBytes
- if this is true, Uint8Array
s will be written into duplex
, otherwise Uint8ArrayList
s will
Optional
options: ByteListInit
Handle multistream protocol selections for the given list of protocols.
Note that after a protocol is handled
listener
can no longer be used.Returns
A stream for the selected protocol and the protocol that was selected from the list of protocols provided to
select
Example