pub struct DispatcherConfig(/* private fields */);
Expand description
Shared dispatcher configuration
Implementations§
source§impl DispatcherConfig
impl DispatcherConfig
sourcepub fn keepalive_timeout(&self) -> Seconds
pub fn keepalive_timeout(&self) -> Seconds
Get keep-alive timeout
sourcepub fn disconnect_timeout(&self) -> Seconds
pub fn disconnect_timeout(&self) -> Seconds
Get disconnect timeout
sourcepub fn set_keepalive_timeout(&self, timeout: Seconds) -> &Self
pub fn set_keepalive_timeout(&self, timeout: Seconds) -> &Self
Set keep-alive timeout in seconds.
To disable timeout set value to 0.
By default keep-alive timeout is set to 30 seconds.
sourcepub fn set_disconnect_timeout(&self, timeout: Seconds) -> &Self
pub fn set_disconnect_timeout(&self, timeout: Seconds) -> &Self
Set connection disconnect timeout.
Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.
To disable timeout set value to 0.
By default disconnect timeout is set to 1 seconds.
sourcepub fn set_frame_read_rate(
&self,
timeout: Seconds,
max_timeout: Seconds,
rate: u16,
) -> &Self
pub fn set_frame_read_rate( &self, timeout: Seconds, max_timeout: Seconds, rate: u16, ) -> &Self
Set read rate parameters for single frame.
Set read timeout, max timeout and rate for reading payload. If the client
sends rate
amount of data within timeout
period of time, extend timeout by timeout
seconds.
But no more than max_timeout
timeout.
By default frame read rate is disabled.
Trait Implementations§
source§impl Clone for DispatcherConfig
impl Clone for DispatcherConfig
source§fn clone(&self) -> DispatcherConfig
fn clone(&self) -> DispatcherConfig
Returns a copy 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 DispatcherConfig
impl Debug for DispatcherConfig
Auto Trait Implementations§
impl Freeze for DispatcherConfig
impl !RefUnwindSafe for DispatcherConfig
impl !Send for DispatcherConfig
impl !Sync for DispatcherConfig
impl Unpin for DispatcherConfig
impl !UnwindSafe for DispatcherConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)