Пример #1
0
        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();
        }
Пример #2
0
        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();
        }