Struct naia_server::ServerConfig
source · [−]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: SocketConfigUsed to configure the Server’s underlying socket
send_handshake_interval: DurationThe duration between the resend of certain connection handshake messages
disconnection_timeout_duration: DurationThe duration to wait for communication from a remote host before initiating a disconnect
heartbeat_interval: DurationThe 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: DurationThe duration to wait before sending a ping message to the remote host, in order to estimate RTT time
rtt_sample_size: u16Number of samples to measure RTT & Jitter by. A higher number will smooth out RTT measurements, but at the cost of responsiveness.
require_auth: boolDetermines whether to require that the Client send some auth message in order to connect.
Trait Implementations
sourceimpl Clone for ServerConfig
impl Clone for ServerConfig
sourcefn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 more
Auto Trait Implementations
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more