nautilus_sockets/server/config.rs
1use std::time::Duration;
2
3/// The config of how the [server](crate::server::NautServer) should be structured
4pub struct ServerConfig {
5 /// The max amount of connections the server will process
6 pub max_connections: u8,
7 /// How long it takes for the server to free an idling client
8 pub idle_connection_time: Duration,
9}
10
11impl Default for ServerConfig {
12 fn default() -> Self {
13 Self {
14 max_connections: 128,
15 idle_connection_time: Duration::from_secs(20),
16 }
17 }
18}