Module websocket

Source
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
  • Clean shutdown sequence
  • Split read/write architecture
  • Python callback integration

Design:

  • Single reader, multiple writer model
  • Read half runs in dedicated task
  • Write half protected by Arc<Mutex>
  • Controller task manages lifecycle

Structs§

WebSocketClient
WebSocket client with automatic reconnection.
WebSocketConfig

Type Aliases§

MessageReader