Пример #1
0
        private void OnSS_Register_Req(PacketRequest reqPacket)
        {
            PacketResponse resPacket = new PacketResponse(reqPacket);
            Int32 serverUid = reqPacket.GetInt32();

            _svrInfo = ServerCatalog.Items.Find(v => v.Uid == serverUid);
            if (_svrInfo == null)
                resPacket.ResultCodeNo = ResultCode.InvalidUid;
            else
            {
                resPacket.ResultCodeNo = ResultCode.Ok;
                _svrInfo.Status = ServerStatus.Activate;

                Logger.Write(LogType.Info, 2, "GameServer({0}) registered.", serverUid);
            }

            SendPacket(resPacket);
        }
Пример #2
0
        private void OnSS_Traffic_Ntf(PacketRequest reqPacket)
        {
            if (_svrInfo == null)
                return;

            _svrInfo.Traffic = reqPacket.GetInt32();
        }