pub struct WsConfig {Show 14 fields
pub url: String,
pub connect_timeout: u64,
pub ping_interval: u64,
pub reconnect_interval: u64,
pub max_reconnect_attempts: u32,
pub auto_reconnect: bool,
pub enable_compression: bool,
pub pong_timeout: u64,
pub backoff_config: BackoffConfig,
pub max_subscriptions: usize,
pub shutdown_timeout: u64,
pub message_channel_capacity: usize,
pub write_channel_capacity: usize,
pub backpressure_strategy: BackpressureStrategy,
}Expand description
WebSocket connection configuration.
Fields§
§url: StringWebSocket server URL
connect_timeout: u64Connection timeout in milliseconds
ping_interval: u64Ping interval in milliseconds
reconnect_interval: u64Reconnection delay in milliseconds (legacy, use backoff_config for exponential backoff)
max_reconnect_attempts: u32Maximum reconnection attempts before giving up
auto_reconnect: boolEnable automatic reconnection on disconnect
enable_compression: boolEnable message compression
pong_timeout: u64Pong timeout in milliseconds
backoff_config: BackoffConfigExponential backoff configuration for reconnection.
max_subscriptions: usizeMaximum number of subscriptions allowed.
shutdown_timeout: u64Shutdown timeout in milliseconds.
message_channel_capacity: usizeMessage channel capacity (incoming messages buffer size).
When this limit is reached, backpressure is applied according to
backpressure_strategy. Default: 1000 messages.
write_channel_capacity: usizeWrite channel capacity (outgoing messages buffer size).
Default: 100 messages.
backpressure_strategy: BackpressureStrategyStrategy to use when message channel is full.
Default: DropOldest to ensure most recent data is available.