Class WebSocketClient<WSCommand>

Type Parameters

  • WSCommand

Hierarchy

Constructors

Properties

_listeners: { command?: EventListener<{ args: [WSCommand] }>[]; error?: EventListener<{ args: [Error] }>[] } = {}

Type declaration

off: (<K>(type: K, callback: EventListener<WebsocketEventMap<WSCommand>[K]>) => void) = ...

Type declaration

on: (<K>(type: K, callback: EventListener<WebsocketEventMap<WSCommand>[K]>) => (() => void)) = ...

Type declaration

Accessors

  • get isConnected(): boolean
  • Returns boolean

Methods

  • Returns void

  • Returns Promise<unknown>

  • Parameters

    • command: WSCommand

    Returns void

  • Parameters

    • sessionKey: string

    Returns void

Generated using TypeDoc