pub struct ConnectionConfig {
pub max_connections: Option<usize>,
pub auth_timeout_secs: Option<u64>,
pub max_concurrent_streams: Option<usize>,
pub max_concurrent_datagrams: Option<usize>,
}Expand description
Connection-level configuration for managing connection lifecycle and resource limits
Fields§
§max_connections: Option<usize>Maximum number of concurrent connections [default: 10000]
auth_timeout_secs: Option<u64>Authentication timeout in seconds [default: 10]
max_concurrent_streams: Option<usize>Maximum concurrent stream connections per client connection [default: 4096]
max_concurrent_datagrams: Option<usize>Maximum concurrent datagram handlers per client connection [default: 4096]
Implementations§
Source§impl ConnectionConfig
impl ConnectionConfig
Sourcepub fn max_connections(&self) -> usize
pub fn max_connections(&self) -> usize
Get max connections with default
Sourcepub fn auth_timeout_secs(&self) -> u64
pub fn auth_timeout_secs(&self) -> u64
Get authentication timeout with default (in seconds)
Sourcepub fn handshake_timeout_secs(&self) -> u64
👎Deprecated: Use auth_timeout_secs instead
pub fn handshake_timeout_secs(&self) -> u64
Get handshake timeout with default (in seconds)
Deprecated: Use auth_timeout_secs instead
Sourcepub fn max_concurrent_streams(&self) -> usize
pub fn max_concurrent_streams(&self) -> usize
Get max concurrent streams with default
Sourcepub fn max_concurrent_datagrams(&self) -> usize
pub fn max_concurrent_datagrams(&self) -> usize
Get max concurrent datagrams with default
Trait Implementations§
Source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
Source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
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 ConnectionConfig
impl Debug for ConnectionConfig
Source§impl Default for ConnectionConfig
impl Default for ConnectionConfig
Source§impl<'de> Deserialize<'de> for ConnectionConfig
impl<'de> Deserialize<'de> for ConnectionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectionConfig
impl RefUnwindSafe for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnsafeUnpin for ConnectionConfig
impl UnwindSafe for ConnectionConfig
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