pub struct ServerConfig {
pub current_time: Duration,
pub max_clients: usize,
pub protocol_id: u64,
pub public_addresses: Vec<SocketAddr>,
pub authentication: ServerAuthentication,
}
Fields§
§current_time: Duration
§max_clients: usize
Maximum numbers of clients that can be connected at a time
protocol_id: u64
Unique identifier for this particular game/application. You can use a hash function with the current version of the game to generate this value so that older versions cannot connect to newer versions.
public_addresses: Vec<SocketAddr>
Publicly available addresses to which clients will attempt to connect.
authentication: ServerAuthentication
Authentication configuration for the server
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more