Make sure everythings init correctly on boot

This commit is contained in:
derek.holloway committed 2026-08-06 09:45:28 -07:00
1 parent f946ebef1e
commit 3464e93aee
3 files changed
+10 -11

No files matched your search

+8 -9
View File
@@ -9,18 +9,17 @@ namespace Mistox.Server {
public class MistoxServer {
public string ServerName { get; private set; } = ""; // The name of the server
public int MaxClients { get; set; } = 10; // The max players per server
public float ConnectionRange { get; set; } = 40; // InGame distance for valid conections
public string ConnectionKey { get; set; } = ""; // The connection key for the server
public int ConnectionTimeoutSeconds { get; set; } = 10; // If no reply in time kill the connection
public bool Alive { get; set; } = true; // Is the server running
public ConcurrentDictionary<string, ServerConnection> Connections; // All the active connections. key is username
public string ServerName { get; private set; } = ""; // The name of the server
public int MaxClients { get; set; } = 10; // The max players per server
public float ConnectionRange { get; set; } = 40; // InGame distance for valid conections
public string ConnectionKey { get; set; } = ""; // The connection key for the server
public int ConnectionTimeoutSeconds { get; set; } = 10; // If no reply in time kill the connection
public bool Alive { get; set; } = true; // Is the server running
public ConcurrentDictionary<string, ServerConnection> Connections = new(); // All the active connections. key is username
private readonly ServerListener Listener; // The Connection Listener singleton
private readonly ServerListener Listener; // The Connection Listener singleton
public MistoxServer(IPEndPoint ListenerAddress, string serverName) {
Connections = new ConcurrentDictionary<string, ServerConnection>();
ServerName = serverName;
Listener = new ServerListener(ListenerAddress, this);
Console.WriteLine( "The Server is initilized and waiting for clients to connect at port : " + ListenerAddress.Port );