Expand description
WebSocket connection management — auto-reconnect and backpressure.
§Responsibility
Manage the lifecycle of a WebSocket feed connection: connect, receive messages, detect disconnections, apply exponential backoff reconnect, and propagate backpressure when the downstream channel is full.
§Guarantees
- Non-panicking: all operations return Result
- Configurable: reconnect policy and buffer sizes are constructor params
Structs§
- Connection
Config - Configuration for a WebSocket feed connection.
- Reconnect
Policy - Reconnection policy for a WebSocket feed.
- WsManager
- Manages a single WebSocket feed: connect, receive, reconnect.
- WsStats
- Statistics collected during WebSocket operation.