Skip to main content
Version: Next

WsOptions interface

Options for the WebSocket connection to the browser.

Signature

export interface WsOptions

Remarks

Only used in the Node.js environment.

Properties

Property

Modifiers

Type

Description

Default

headers

optional

Record<string, string>

Headers to use for the web socket connection.

keepAlive

optional

boolean

Whether to send WebSocket pings and drop the connection when a pong does not come back within the same interval. Detects a connection that died without a close frame, which otherwise leaves calls hanging until protocolTimeout.

false

keepAliveIntervalMs

optional

number

Ping period in milliseconds. Only used when WsOptions.keepAlive is set.

30_000