Expand description
High-performance WebSocket client implementation with automatic reconnection with exponential backoff and state management. Key features:
- Connection state tracking (ACTIVE/RECONNECTING/DISCONNECTING/CLOSED)
- Synchronized reconnection with backoff
- Split read/write architecture
- Python callback integration
Design:
- Single reader, multiple writer model
- Read half runs in dedicated task
- Write half runs in dedicated task connected with channel
- Controller task manages lifecycle
Structs§
- WebSocket
Client - WebSocket client with automatic reconnection.
- WebSocket
Config
Functions§
- channel_
message_ handler - Creates a channel-based message handler.
Type Aliases§
- Message
Handler - Function type for handling WebSocket messages.
- Message
Reader - Ping
Handler - Function type for handling WebSocket ping messages.