Expand description
WebSocket client module.
Provides asynchronous WebSocket connection management, subscription handling, and heartbeat maintenance for cryptocurrency exchange streaming APIs.
§Observability
This module uses the tracing crate for structured logging. Key events:
- Connection establishment and disconnection
- Subscription and unsubscription events with stream names
- Message parsing failures with raw message preview (truncated)
- Reconnection attempts and outcomes
- Ping/pong heartbeat events
Structs§
- Auto
Reconnect Coordinator - Automatic reconnection coordinator for WebSocket connections.
- Subscription
- WebSocket subscription metadata.
- WsClient
- Async WebSocket client for exchange streaming APIs.
- WsConfig
- WebSocket connection configuration.
- WsStats
- WebSocket connection statistics.
Enums§
- WsConnection
State - WebSocket connection state.
- WsEvent
- WebSocket connection event types.
- WsMessage
- WebSocket message types for exchange communication.
Type Aliases§
- WsEvent
Callback - Event callback function type.