Skip to main content

Interface: WsConfig_InNode

Config for a WebSocket connection to Chronik.

Properties

autoReconnect

Optional autoReconnect: boolean

Whether to automatically reconnect on disconnect, default true.

Defined in

src/ChronikClientNode.ts:352


onConnect

Optional onConnect: (e: Event) => void

Fired when a connection has been (re)established.

Type declaration

▸ (e): void

Parameters
NameType
eEvent
Returns

void

Defined in

src/ChronikClientNode.ts:334


onEnd

Optional onEnd: (e: Event) => void

Fired after a connection has been manually closed, or if autoReconnect is false, if the WebSocket disconnects for any reason.

Type declaration

▸ (e): void

Parameters
NameType
eEvent
Returns

void

Defined in

src/ChronikClientNode.ts:349


onError

Optional onError: (e: ErrorEvent) => void

Fired when an error with the WebSocket occurs.

Type declaration

▸ (e): void

Parameters
NameType
eErrorEvent
Returns

void

Defined in

src/ChronikClientNode.ts:343


onMessage

Optional onMessage: (msg: WsMsgClient) => void

Fired when a message is sent from the WebSocket.

Type declaration

▸ (msg): void

Parameters
NameType
msgWsMsgClient
Returns

void

Defined in

src/ChronikClientNode.ts:331


onReconnect

Optional onReconnect: (e: Event) => void

Fired after a connection has been unexpectedly closed, and before a reconnection attempt is made. Only fired if autoReconnect is true.

Type declaration

▸ (e): void

Parameters
NameType
eEvent
Returns

void

Defined in

src/ChronikClientNode.ts:340