Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MultistreamSelect
    • Listener

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Listener(stream: DuplexStream<Uint8Array | BufferList>): Listener
  • Parameters

    • stream: DuplexStream<Uint8Array | BufferList>

    Returns Listener

Properties

_shaken

_shaken: boolean

_stream

_stream: DuplexStream<Uint8Array | BufferList>

Methods

_handshake

  • _handshake(options: undefined | AbortOptions): Promise<void>
  • Perform the multistream-select handshake

    Parameters

    • options: undefined | AbortOptions

    Returns Promise<void>

handle

  • handle(protocols: string | string[], options: undefined | AbortOptions): Promise<{ protocol: string; stream: any }>
  • Parameters

    • protocols: string | string[]
    • options: undefined | AbortOptions

    Returns Promise<{ protocol: string; stream: any }>