Struct naia_client::ClientConfig
source · [−]pub struct ClientConfig {
pub socket_config: SocketConfig,
pub send_handshake_interval: Duration,
pub disconnection_timeout_duration: Duration,
pub heartbeat_interval: Duration,
pub ping_interval: Duration,
pub rtt_sample_size: u16,
pub minimum_command_latency: Option<Duration>,
}
Expand description
Contains Config properties which will be used by a Server or Client
Fields
socket_config: SocketConfig
Used to configure the Server’s underlying socket
send_handshake_interval: Duration
The duration between the resend of certain connection handshake messages
disconnection_timeout_duration: Duration
The duration to wait for communication from a remote host before initiating a disconnect
heartbeat_interval: Duration
The duration to wait before sending a heartbeat message to a remote host, if the host has not already sent another message within that time.
ping_interval: Duration
The duration to wait before sending a ping message to the remote host, in order to estimate RTT time
rtt_sample_size: u16
Number of samples to measure RTT & Jitter by. A higher number will smooth out RTT measurements, but at the cost of responsiveness.
minimum_command_latency: Option<Duration>
The minimum of measured latency to the Server that the Client use to ensure Command packets arrive in time. Should be fine if this is 0, but you’ll increase the chance that packets always arrive to be processed by the Server with a higher number. This is especially helpful early on in the connection, when estimates of latency are less accurate.
Trait Implementations
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
Mutably borrows from an owned value. Read more