pub struct TcpIpcConfig {
pub after_connect_wait_time: Option<Duration>,
pub read_iteration_wait_time: Option<Duration>,
pub shutdown_wait_time: Option<Duration>,
pub check_count: u32,
}
Expand description
This bundles the time-settings for the protocol A ‘None’ value means that there will no time spend waiting.
§Example
let config = TcpIpcConfig {
after_connect_wait_time: Some(std::time::Duration::from_micros(5_000)),
read_iteration_wait_time: Some(std::time::Duration::from_micros(1)),
shutdown_wait_time: Some(std::time::Duration::from_micros(5_000_000)),
check_count: 1,
};
Fields§
§after_connect_wait_time: Option<Duration>
This is the time the program waits for the server after it accepted the initial TCP connection. For example, this can be used to wait for the server doing some initialization. Moreover, the message read queue thread needs some time to start.
read_iteration_wait_time: Option<Duration>
This is the time the client sleeps between checking for new messages from the server. Very small values can yield high CPU-usage.
shutdown_wait_time: Option<Duration>
This is the time the client waits for the server to accept a shutdown request.
check_count: u32
This is the number of iterations inside the read thread after which the busy_update_state will be checked A good default value is 1 (check after each iteration)
Trait Implementations§
Source§impl Clone for TcpIpcConfig
impl Clone for TcpIpcConfig
Source§fn clone(&self) -> TcpIpcConfig
fn clone(&self) -> TcpIpcConfig
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 TcpIpcConfig
impl Debug for TcpIpcConfig
Source§impl PartialEq for TcpIpcConfig
impl PartialEq for TcpIpcConfig
impl Copy for TcpIpcConfig
impl StructuralPartialEq for TcpIpcConfig
Auto Trait Implementations§
impl Freeze for TcpIpcConfig
impl RefUnwindSafe for TcpIpcConfig
impl Send for TcpIpcConfig
impl Sync for TcpIpcConfig
impl Unpin for TcpIpcConfig
impl UnwindSafe for TcpIpcConfig
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