AxibugEmuOnline/AxibugEmuOnline.Server/Manager/AppSrv.cs

41 lines
1.3 KiB
C#
Raw Normal View History

2024-09-20 18:27:13 +08:00
using AxibugEmuOnline.Server.Common;
using AxibugEmuOnline.Server.Manager;
2024-06-28 17:43:55 +08:00
using AxibugEmuOnline.Server.NetWork;
using System.Net;
namespace AxibugEmuOnline.Server
{
2024-07-09 17:22:09 +08:00
public static class AppSrv
2024-06-28 17:43:55 +08:00
{
public static TickManager g_Tick;
2024-06-28 17:43:55 +08:00
public static ClientManager g_ClientMgr;
public static LogManager g_Log;
public static LoginManager g_Login;
public static ChatManager g_Chat;
public static UserManager g_UserMgr;
2024-06-28 17:43:55 +08:00
public static IOCPNetWork g_SocketMgr;
2024-07-09 17:22:09 +08:00
public static RoomManager g_Room;
public static GameShareManager g_GameShareMgr;
2024-06-28 17:43:55 +08:00
public static void InitServer(int port)
{
2024-09-20 18:27:13 +08:00
Config.LoadConfig();
Haoyue_SQLPoolManager.InitConnMgr();
g_Tick = new TickManager();
2024-06-28 17:43:55 +08:00
g_ClientMgr = new ClientManager();
g_ClientMgr.Init(45000, 120);
g_Log = new LogManager();
g_Login = new LoginManager();
g_Chat = new ChatManager();
g_UserMgr = new UserManager();
g_SocketMgr = new IOCPNetWork(1024, 4096 * 2);
2024-07-09 17:22:09 +08:00
g_Room = new RoomManager();
g_GameShareMgr = new GameShareManager();
2024-06-28 17:43:55 +08:00
g_SocketMgr.Init();
g_SocketMgr.Start(new IPEndPoint(IPAddress.Any.Address, port));
Console.WriteLine("Succeed!");
}
}
}