HaoYueNet/Simple/ServerCore/Manager/ServerManager.cs

26 lines
794 B
C#
Raw Normal View History

2023-12-14 18:15:04 +08:00
using ServerCore.NetWork;
using System.Net;
2023-05-25 13:46:54 +08:00
namespace ServerCore.Manager
{
public static class ServerManager
{
public static ClientManager g_ClientMgr;
public static LogManager g_Log;
public static LoginManager g_Login;
public static ChatManager g_Chat;
public static IOCPNetWork g_SocketMgr;
public static void InitServer(int port)
{
g_ClientMgr = new ClientManager();
g_Log = new LogManager();
g_Login = new LoginManager();
g_Chat = new ChatManager();
g_SocketMgr = new IOCPNetWork(1024, 1024);
g_SocketMgr.Init();
g_SocketMgr.Start(new IPEndPoint(IPAddress.Any.Address, port));
Console.WriteLine("Succeed!");
}
}
}