Struct rust_tcp_ipc::ClientConfig
source · pub struct ClientConfig {
pub connect_wait_time_ms: u64,
pub after_connect_wait_time_ms: u64,
pub read_iteration_wait_time_ns: u64,
pub shutdown_wait_time_in_ns: u64,
}
Expand description
This bundles the time-settings for the protocol
Example
let config = ClientConfig {
connect_wait_time_ms: 5_000,
read_iteration_wait_time_ns: 1_000,
shutdown_wait_time_in_ns: 1_000_000,
};
Fields
connect_wait_time_ms: u64
This is the time the server as to accept a TCP-connection.
after_connect_wait_time_ms: u64
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_ns: u64
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_in_ns: u64
This is the time the client waits for the server to accept a shutdown request.
Trait Implementations
sourceimpl Clone for ClientConfig
impl Clone for ClientConfig
sourcefn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ClientConfig
impl Debug for ClientConfig
sourceimpl PartialEq<ClientConfig> for ClientConfig
impl PartialEq<ClientConfig> for ClientConfig
sourcefn eq(&self, other: &ClientConfig) -> bool
fn eq(&self, other: &ClientConfig) -> bool
impl Copy for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more