Expand description
WebSocket client module.
Provides asynchronous WebSocket connection management, subscription handling, and heartbeat maintenance for cryptocurrency exchange streaming APIs.
Structs§
- Auto
Reconnect Coordinator - Automatic reconnection coordinator for WebSocket connections.
- Backoff
Config - Exponential backoff configuration for reconnection.
- Backoff
Strategy - Calculates retry delay with exponential backoff and jitter.
- Subscription
- WebSocket subscription metadata.
- Subscription
Manager - Subscription manager with capacity limits.
- WsClient
- Async WebSocket client for exchange streaming APIs.
- WsConfig
- WebSocket connection configuration.
- WsError
- Extended WebSocket error with classification.
- WsStats
- WebSocket connection statistics (lock-free).
- WsStats
Snapshot - Immutable snapshot of WebSocket connection statistics.
Enums§
- Backpressure
Strategy - Backpressure strategy when message channel is full.
- WsConnection
State - WebSocket connection state.
- WsError
Kind - WebSocket error classification.
- WsEvent
- WebSocket connection event types.
- WsMessage
- WebSocket message types for exchange communication.
Constants§
- DEFAULT_
MAX_ SUBSCRIPTIONS - Default maximum number of subscriptions.
- DEFAULT_
MESSAGE_ CHANNEL_ CAPACITY - Default message channel capacity.
- DEFAULT_
SHUTDOWN_ TIMEOUT - Default shutdown timeout in milliseconds.
- DEFAULT_
WRITE_ CHANNEL_ CAPACITY - Default write channel capacity.
Type Aliases§
- WsEvent
Callback - Event callback function type.