pub struct WsConfig {
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,
}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
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
Connection is considered dead if no pong received within this duration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsConfig
impl RefUnwindSafe for WsConfig
impl Send for WsConfig
impl Sync for WsConfig
impl Unpin for WsConfig
impl UnwindSafe for WsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more