WebSocketTransportOptions
Defined in: websocket.ts:27
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
autoConnect? | boolean | Connect immediately on construction. Default true. | websocket.ts:43 |
backoffMs? | (attempt) => number | Backoff before reconnect attempt n (1-based), in ms. Default exponential 250ms → 10s. | websocket.ts:37 |
clearTimeoutImpl? | (handle) => void | Cancel a scheduled callback. Defaults to clearTimeout. Injectable for tests. | websocket.ts:47 |
deserialize? | (raw) => unknown | Parse an inbound frame. Default JSON.parse. | websocket.ts:35 |
maxRetries? | number | Give up after this many consecutive failed reconnects. Default Infinity. | websocket.ts:39 |
onStatus? | (status) => void | Notified on every connection-state change. | websocket.ts:41 |
protocols? | string | string[] | Sub-protocols passed to the socket constructor. | websocket.ts:29 |
serialize? | (message) => string | Serialize an outgoing message. Default JSON.stringify. | websocket.ts:33 |
setTimeoutImpl? | (handler, ms) => unknown | Schedule a delayed callback. Defaults to setTimeout. Injectable for tests. | websocket.ts:45 |
WebSocketImpl? | WebSocketCtor | WebSocket implementation. Defaults to the global WebSocket. | websocket.ts:31 |