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
onConnect
• Optional
onConnect: (e
: Event
) => void
Fired when a connection has been (re)established.
Type declaration
▸ (e
): void
Parameters
Name | Type |
---|---|
e | Event |
Returns
void
Defined in
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
Name | Type |
---|---|
e | Event |
Returns
void
Defined in
onError
• Optional
onError: (e
: ErrorEvent
) => void
Fired when an error with the WebSocket occurs.
Type declaration
▸ (e
): void
Parameters
Name | Type |
---|---|
e | ErrorEvent |
Returns
void
Defined in
onMessage
• Optional
onMessage: (msg
: WsMsgClient
) => void
Fired when a message is sent from the WebSocket.
Type declaration
▸ (msg
): void
Parameters
Name | Type |
---|---|
msg | WsMsgClient |
Returns
void
Defined in
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
Name | Type |
---|---|
e | Event |
Returns
void