pub struct IoConfig { /* private fields */ }Expand description
Base io configuration
Implementations§
Source§impl IoConfig
impl IoConfig
Sourcepub fn connect_timeout(&self) -> Millis
pub fn connect_timeout(&self) -> Millis
Get connect timeout
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 frame_read_rate(&self) -> Option<&FrameReadRate>
pub fn frame_read_rate(&self) -> Option<&FrameReadRate>
Get frame read params
Sourcepub fn set_connect_timeout<T>(self, timeout: T) -> IoConfig
pub fn set_connect_timeout<T>(self, timeout: T) -> IoConfig
Set connect timeout in seconds.
To disable timeout set value to 0.
By default connect timeout is disabled.
Sourcepub fn set_keepalive_timeout<T>(self, timeout: T) -> IoConfig
pub fn set_keepalive_timeout<T>(self, timeout: T) -> IoConfig
Set keep-alive timeout in seconds.
To disable timeout set value to 0.
By default keep-alive timeout is disabled.
Sourcepub fn set_disconnect_timeout<T>(self, timeout: T) -> IoConfig
pub fn set_disconnect_timeout<T>(self, timeout: T) -> IoConfig
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: u32,
) -> IoConfig
pub fn set_frame_read_rate( self, timeout: Seconds, max_timeout: Seconds, rate: u32, ) -> IoConfig
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.