Hierarchy

  • WebSocketNetworkAdapter
    • BrowserWebSocketClientAdapter

Constructors

Properties

peerId?: PeerId
peerMetadata?: PeerMetadata
remotePeerId?: PeerId
retryInterval: number = 5000
socket?: WebSocket
url: string
prefixed: string | boolean

Methods

  • Type Parameters

    Parameters

    Returns this

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (keyof NetworkAdapterEvents)[]

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    Parameters

    Returns this

  • Add a listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: keyof NetworkAdapterEvents

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    Parameters

    Returns this