Skip to content

API reference / @chanx-js/client / core / HeartbeatOptions

Interface: HeartbeatOptions ​

Defined in: packages/client/src/core/socket.ts:20

Properties ​

interval? ​

ts
optional interval?: number;

Defined in: packages/client/src/core/socket.ts:22

Milliseconds between pings.


message? ​

ts
optional message?: () => object;

Defined in: packages/client/src/core/socket.ts:26

Frame to send. Defaults to chanx's own { action: 'ping' }.

Returns ​

object


timeout? ​

ts
optional timeout?: number;

Defined in: packages/client/src/core/socket.ts:24

Close and reconnect if nothing arrives within this long after a ping.

MIT licensed