Interface LabGuiWebsocketOptions

Hierarchy

Properties

automaticOpen?: boolean

Whether or not the websocket should attempt to connect immediately upon instantiation.

binaryType?: "blob" | "arraybuffer"

The binary type, possible values 'blob' or 'arraybuffer', default 'blob'.

debug?: boolean

Whether this instance should log debug messages.

maxReconnectAttempts?: null | number

The maximum number of reconnection attempts to make. Unlimited if null.

maxReconnectInterval?: number

The maximum number of milliseconds to delay a reconnection attempt.

protocols?: string[]

Protocols to be used

reconnectDecay?: number

The rate of increase of the reconnect delay. Allows reconnect attempts to back off when problems persist.

reconnectInterval?: number

The number of milliseconds to delay before attempting to reconnect.

timeoutInterval?: number

The maximum time in milliseconds to wait for a connection to succeed before closing and retrying.

websocketClass?: { CLOSED: number; CLOSING: number; CONNECTING: number; OPEN: number; prototype: WebSocket }

WebSocket Class to create the WebSocket, this is mainly to mock it for testing

Type declaration

  • Readonly CLOSED: number
  • Readonly CLOSING: number
  • Readonly CONNECTING: number
  • Readonly OPEN: number
  • prototype: WebSocket

Generated using TypeDoc