Module ws_client

Module ws_client 

Source
Expand description

WebSocket client module.

Provides asynchronous WebSocket connection management, subscription handling, and heartbeat maintenance for cryptocurrency exchange streaming APIs.

Structs§

AutoReconnectCoordinator
Automatic reconnection coordinator for WebSocket connections.
BackoffConfig
Exponential backoff configuration for reconnection.
BackoffStrategy
Calculates retry delay with exponential backoff and jitter.
Subscription
WebSocket subscription metadata.
SubscriptionManager
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).
WsStatsSnapshot
Immutable snapshot of WebSocket connection statistics.

Enums§

BackpressureStrategy
Backpressure strategy when message channel is full.
WsConnectionState
WebSocket connection state.
WsErrorKind
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§

WsEventCallback
Event callback function type.