Reconnect & subscription restore
If the connection drops by surprise, the client reconnects on its own. It waits a bit longer between each try (exponential backoff) and adds a little random delay (jitter). Once the socket is back, it re-sends every active subscription. After you callclose(), it stops trying.
Each reconnect try fires a reconnect lifecycle event with the try number and the wait before the next try.
Heartbeats
The client sends a ping every so often. Any incoming frame proves the connection is alive. If nothing arrives before the timeout, the client treats the connection as dead, closes it, and reconnects.- TypeScript —
heartbeat: { intervalMs, timeoutMs }, orheartbeat: falseto disable. - Python —
heartbeat=True/False,heartbeat_interval,heartbeat_timeout(seconds). - Rust —
RealtimeOptions::heartbeat(HeartbeatOptions { interval, timeout })(bothDuration), or.disable_heartbeat().