Files
GameServer/MistoxServer/Server/Entities/MistoxServer.cs
T
2026-07-03 11:37:41 -07:00

22 lines
1.2 KiB
C#

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<TcpClientConnection> onUserConnected;
public void InvokeUserConnected( TcpClientConnection user ){ onUserConnected?.Invoke( user ); }
public event Action<dynamic> onDataReceived;
public void InvokeDataReceived( dynamic data ){ onDataReceived?.Invoke( data ); }
public event Action<TcpClientConnection> onUserDisconnected;
public void InvokeUserDisconnected( TcpClientConnection user ){ onUserDisconnected?.Invoke( user ); }
}
}