Expand description
Static transport and lifecycle configuration for WebSocket connections.
WebSocketConfig selects the endpoint, upgrade headers, heartbeat and idle detection,
reconnect policy, transport backend, and optional proxy. Runtime handlers and rate limiting are
supplied through the client builders instead.
§Reconnection strategy
Reconnect settings apply only in handler mode; stream mode ignores them.
reconnect_max_attempts: None permits unlimited attempts with exponential backoff, while
Some(n) closes the client once n consecutive reconnect attempts have either failed or
established connections active for less than 10 seconds. A reconnect active for at least 10
seconds resets its attempt count and backoff delay; shorter-lived connections continue the
current cycle.
Structs§
- Initial
Connect Retry Policy - Retry policy for establishing the initial handler-mode connection.
- WebSocket
Config - Static configuration for WebSocket client connections.
- WebSocket
Config Builder - Use builder syntax to set the inputs and finish with
build_inner().
Enums§
- Transport
Backend - WebSocket transport backend selection.