Struct naia_server::ServerConfig[][src]

pub struct ServerConfig {
    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 require_auth: bool,
}
Expand description

Contains Config properties which will be used by the Server

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.

require_auth: bool

Determines whether to require that the Client send some auth message in order to connect.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.