Example #1
0
        public void RequestRegistServer(SFNETPacket packetData)
        {
            try
            {
                var request = JsonEnDecode.Decode<JsonPacketRequestReqistServer>(packetData.GetData());

                // 이미 등록된 유저인가? serial, ID
                var result = ServerManagerRef.AddServer(packetData.SessionID(), request.ServerName);

                var response = new JsonPacketResponseReqistServer() { Result = result, ServerName = "GameServer" };
                ServerNetworkRef.Send<JsonPacketResponseReqistServer>(packetData.SessionID(), PACKET_ID.RESPONSE_REGIST_SERVER, response);

                DevLog.Write(string.Format("result:{0}, ServerName:{1}, SessionID: {2}", result.ToString(), request.ServerName, packetData.SessionID()), LOG_LEVEL.INFO);
                CGSFNETCommon.FileLogger.Info(string.Format("result:{0}, ServerName:{1}, SessionID: {2}", result.ToString(), request.ServerName, packetData.SessionID()));
            }
            catch
            {
            }
        }
Example #2
0
        public void RequestRegistServer(SFNETPacket packetData)
        {
            try
            {
                var request = JsonEnDecode.Decode <JsonPacketRequestReqistServer>(packetData.GetData());

                // 이미 등록된 유저인가? serial, ID
                var result = ServerManagerRef.AddServer(packetData.SessionID(), request.ServerName);

                var response = new JsonPacketResponseReqistServer()
                {
                    Result = result, ServerName = "GameServer"
                };
                ServerNetworkRef.Send <JsonPacketResponseReqistServer>(packetData.SessionID(), PACKET_ID.RESPONSE_REGIST_SERVER, response);

                DevLog.Write(string.Format("result:{0}, ServerName:{1}, SessionID: {2}", result.ToString(), request.ServerName, packetData.SessionID()), LOG_LEVEL.INFO);
                CGSFNETCommon.FileLogger.Info(string.Format("result:{0}, ServerName:{1}, SessionID: {2}", result.ToString(), request.ServerName, packetData.SessionID()));
            }
            catch
            {
            }
        }