using System; using System.Net; namespace Mistox.Server { public class MistoxServer { public string ServerName { get; set; } = ""; // The name of the server public IPAddress BindAddress { get; set; } = IPAddress.Any; // What IP to bind on public int Port { get; set; } = 9126; // What Port to bind on public int MaxClients { get; set; } = 10; // The max players per server public bool Alive { get; set; } = true; // Is the server running public event Action onUserConnected; public void InvokeUserConnected( TcpClientConnection user ){ onUserConnected?.Invoke( user ); } public event Action onDataReceived; public void InvokeDataReceived( dynamic data ){ onDataReceived?.Invoke( data ); } public event Action onUserDisconnected; public void InvokeUserDisconnected( TcpClientConnection user ){ onUserDisconnected?.Invoke( user ); } } }