Skip to main content

Module config

Module config 

Source
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§

InitialConnectRetryPolicy
Retry policy for establishing the initial handler-mode connection.
WebSocketConfig
Static configuration for WebSocket client connections.
WebSocketConfigBuilder
Use builder syntax to set the inputs and finish with build_inner().

Enums§

TransportBackend
WebSocket transport backend selection.