pub struct WebSocketConfig {
pub url: Url,
pub auto_reconnect: bool,
pub reconnect_delay: Duration,
pub max_reconnect_delay: Duration,
pub max_reconnect_attempts: Option<u32>,
pub ping_interval: Option<Duration>,
pub request_timeout: Duration,
}Available on crate feature
websocket and non-WebAssembly only.Expand description
WebSocket transport configuration.
Fields§
§url: UrlWebSocket URL to connect to
auto_reconnect: boolEnable automatic reconnection
reconnect_delay: DurationInitial reconnection delay (doubles on each attempt)
max_reconnect_delay: DurationMaximum reconnection delay
max_reconnect_attempts: Option<u32>Maximum number of reconnection attempts (None = infinite)
ping_interval: Option<Duration>Ping interval for keepalive
request_timeout: DurationRequest timeout
Trait Implementations§
Source§impl Clone for WebSocketConfig
impl Clone for WebSocketConfig
Source§fn clone(&self) -> WebSocketConfig
fn clone(&self) -> WebSocketConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebSocketConfig
impl Debug for WebSocketConfig
Auto Trait Implementations§
impl Freeze for WebSocketConfig
impl RefUnwindSafe for WebSocketConfig
impl Send for WebSocketConfig
impl Sync for WebSocketConfig
impl Unpin for WebSocketConfig
impl UnwindSafe for WebSocketConfig
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