Skip to content

API reference / @chanx-js/server / node / SocketOptions

Interface: SocketOptions ​

Defined in: packages/server/src/adapters/ws-socket.ts:9

How a ws adapter keeps its sockets healthy.

Properties ​

maxBufferedAmount? ​

ts
optional maxBufferedAmount?: number;

Defined in: packages/server/src/adapters/ws-socket.ts:19

Bytes that may wait unsent for one client before it is dropped: a client that stops reading must not hold the server's memory. Defaults to 16 MiB.


pingInterval? ​

ts
optional pingInterval?: number;

Defined in: packages/server/src/adapters/ws-socket.ts:14

Ping each client this often, closing one that has not answered the previous ping. 0 turns it off. Defaults to 20 seconds.

MIT licensed