pub struct WebSocketBidirectionalConfig {
pub url: Option<String>,
pub bind_addr: Option<String>,
pub max_message_size: usize,
pub keep_alive_interval: Duration,
pub reconnect: ReconnectConfig,
pub elicitation_timeout: Duration,
pub max_concurrent_elicitations: usize,
pub enable_compression: bool,
pub tls_config: Option<TlsConfig>,
}Expand description
Configuration for WebSocket bidirectional transport
Fields§
§url: Option<String>WebSocket URL to connect to (client mode)
bind_addr: Option<String>Bind address for server mode
max_message_size: usizeMaximum message size (default: 16MB)
keep_alive_interval: DurationKeep-alive interval
reconnect: ReconnectConfigReconnection configuration
elicitation_timeout: DurationElicitation timeout
max_concurrent_elicitations: usizeMaximum concurrent elicitations
enable_compression: boolEnable compression
tls_config: Option<TlsConfig>TLS configuration
Implementations§
Source§impl WebSocketBidirectionalConfig
impl WebSocketBidirectionalConfig
Sourcepub fn with_max_message_size(self, size: usize) -> Self
pub fn with_max_message_size(self, size: usize) -> Self
Set maximum message size
Sourcepub fn with_keep_alive_interval(self, interval: Duration) -> Self
pub fn with_keep_alive_interval(self, interval: Duration) -> Self
Set keep-alive interval
Sourcepub fn with_reconnect_config(self, config: ReconnectConfig) -> Self
pub fn with_reconnect_config(self, config: ReconnectConfig) -> Self
Set reconnection configuration
Sourcepub fn with_elicitation_timeout(self, timeout: Duration) -> Self
pub fn with_elicitation_timeout(self, timeout: Duration) -> Self
Set elicitation timeout
Sourcepub fn with_max_concurrent_elicitations(self, max: usize) -> Self
pub fn with_max_concurrent_elicitations(self, max: usize) -> Self
Set maximum concurrent elicitations
Sourcepub fn with_compression(self, enable: bool) -> Self
pub fn with_compression(self, enable: bool) -> Self
Enable compression
Sourcepub fn with_tls_config(self, tls_config: TlsConfig) -> Self
pub fn with_tls_config(self, tls_config: TlsConfig) -> Self
Set TLS configuration
Trait Implementations§
Source§impl Clone for WebSocketBidirectionalConfig
impl Clone for WebSocketBidirectionalConfig
Source§fn clone(&self) -> WebSocketBidirectionalConfig
fn clone(&self) -> WebSocketBidirectionalConfig
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 WebSocketBidirectionalConfig
impl Debug for WebSocketBidirectionalConfig
Auto Trait Implementations§
impl Freeze for WebSocketBidirectionalConfig
impl RefUnwindSafe for WebSocketBidirectionalConfig
impl Send for WebSocketBidirectionalConfig
impl Sync for WebSocketBidirectionalConfig
impl Unpin for WebSocketBidirectionalConfig
impl UnsafeUnpin for WebSocketBidirectionalConfig
impl UnwindSafe for WebSocketBidirectionalConfig
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