naia_server/server_config.rs
1use std::default::Default;
2
3use naia_shared::ConnectionConfig;
4
5use crate::connection::ping_config::PingConfig;
6
7/// Contains Config properties which will be used by the Server
8#[derive(Clone)]
9pub struct ServerConfig {
10 /// Used to configure the connections with Clients
11 pub connection: ConnectionConfig,
12 /// Determines whether to require that the Client send some auth message
13 /// in order to connect.
14 pub require_auth: bool,
15 /// Configuration used to monitor the ping & jitter on the network
16 pub ping: PingConfig,
17}
18
19impl Default for ServerConfig {
20 fn default() -> Self {
21 Self {
22 connection: ConnectionConfig::default(),
23 require_auth: true,
24 ping: PingConfig::default(),
25 }
26 }
27}