Пример #1
0
        public void RequestLogin(SFNETPacket packetData, ConnectUser user)
        {
            try
            {
                var request = JsonEnDecode.Decode<JsonPacketRequestLogin>(packetData.GetData());

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

                var response = new JsonPacketResponseLogin() { Result = result };
                ServerNetworkRef.Send<JsonPacketResponseLogin>(packetData.SessionID(), PACKET_ID.RESPONSE_LOGIN, response);

                DevLog.Write(string.Format("[Login] result:{0}, UserID:{1}, SessionID{2}", result.ToString(), request.ID, packetData.SessionID()), LOG_LEVEL.INFO);
            }
            catch
            {
            }
        }
Пример #2
0
        public void RequestLogin(SFNETPacket packetData, ConnectUser user)
        {
            try
            {
                var request = JsonEnDecode.Decode <JsonPacketRequestLogin>(packetData.GetData());

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

                var response = new JsonPacketResponseLogin()
                {
                    Result = result
                };
                ServerNetworkRef.Send <JsonPacketResponseLogin>(packetData.SessionID(), PACKET_ID.RESPONSE_LOGIN, response);

                DevLog.Write(string.Format("[Login] result:{0}, UserID:{1}, SessionID{2}", result.ToString(), request.ID, packetData.SessionID()), LOG_LEVEL.INFO);
            }
            catch
            {
            }
        }