Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • WebSocketConnection

Index

Constructors

constructor

Properties

Private $alive

$alive: boolean

Private $backoffMultiplier

$backoffMultiplier: number = 1

Private $callbacks

$callbacks: Callbacks = ...

Private Optional $reconnectTimeout

$reconnectTimeout: number

Private Optional $ws

$ws: WebSocket

Private $wsBaseURL

$wsBaseURL: string

Methods

Private calculateNextDelay

  • calculateNextDelay(): number

Private createConnection

  • createConnection(): void

Private log

  • log(message: string, ...args: any[]): void

Private onConnect

  • onConnect(): void

Private onDisconnect

  • onDisconnect(): void

Private onMessage

  • onMessage(message: any): void

Private reconnect

  • reconnect(): void

subscribe

  • subscribe<T>(event: T, cb: SubscriptionsCallbackMap[T]): void

unsubscribe

  • unsubscribe<T>(event: T, cb: SubscriptionsCallbackMap[T]): void

Generated using TypeDoc