public void Init(ServerAppConfig appConfig, ServerNetwork serverNetwork, DB.DBManager dbManager) { ServerNetworkRef = serverNetwork; DBManagerRef = dbManager; UserManagerInst = new ConnectUserManager(); UserManagerInst.Init(appConfig.MaxTotalUserCount); RegistPacketHandler(); }
public void Init(int index, int lobbyCountPerWorkPacketProcess, ServerAppConfig appConfig, ServerNetwork serverNetwork, DB.DBManager dbManager) { Index = index; ServerNetworkRef = serverNetwork; DBManagerRef = dbManager; var firstLobbyID = ((Index - 1) * lobbyCountPerWorkPacketProcess) + 1; if (Index != 1) { firstLobbyID = Index * lobbyCountPerWorkPacketProcess; } LobbyManagerInst = new Lobby.LobbyManager(); LobbyManagerInst.Init(firstLobbyID, lobbyCountPerWorkPacketProcess, appConfig, serverNetwork); RegistPacketHandler(); IsThreadRunning = true; ProcessThread = new System.Threading.Thread(this.Process); ProcessThread.Start(); }