Skip to main content

Module ws

Module ws 

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

ConnectionConfig
Configuration for a WebSocket feed connection.
ReconnectPolicy
Reconnection policy for a WebSocket feed.
WsManager
Manages a single WebSocket feed: connect, receive, reconnect.
WsStats
Statistics collected during WebSocket operation.