コード例 #1
0
 public void LogOutgoingPacket(NecClient client, NecPacket packet)
 {
     if (_setting.LogOutgoingPackets)
     {
         NecLogPacket logPacket = new NecLogPacket(client, packet, NecLogType.Out);
         Packet(logPacket);
     }
 }
コード例 #2
0
 public void LogOutgoingPacket(NecClient client, NecPacket packet, ServerType serverType)
 {
     if (_setting.LogOutgoingPackets)
     {
         NecLogPacket logPacket = new NecLogPacket(client.Identity, packet, NecLogType.PacketOut, serverType);
         WritePacket(logPacket);
     }
 }
コード例 #3
0
 public void LogUnknownIncomingPacket(NecClient client, NecPacket packet, string identity)
 {
     if (_setting.LogUnknownIncomingPackets)
     {
         NecLogPacket logPacket = new NecLogPacket(client, packet, NecLogType.Unhandled, identity);
         Packet(logPacket);
     }
 }
コード例 #4
0
 public void LogIncomingPacket(NecClient client, NecPacket packet, ServerType serverType)
 {
     if (_setting.logIncomingPackets)
     {
         NecLogPacket logPacket = new NecLogPacket(client.identity, packet, NecLogType.PacketIn, serverType);
         WritePacket(logPacket);
     }
 }
コード例 #5
0
 public void LogUnknownIncomingPacket(NecClient client, NecPacket packet, ServerType serverType)
 {
     if (_setting.LogUnknownIncomingPackets)
     {
         NecLogPacket logPacket =
             new NecLogPacket(client.Identity, packet, NecLogType.PacketUnhandled, serverType);
         WritePacket(logPacket);
     }
 }
コード例 #6
0
        public void LogOutgoingPacket(NecConnection connection, NecPacket packet, ServerType serverType)
        {
            NecClient client = connection.Client;

            if (client != null)
            {
                LogOutgoingPacket(client, packet, serverType);
                return;
            }

            if (!_setting.LogIncomingPackets)
            {
                return;
            }

            NecLogPacket logPacket = new NecLogPacket(connection.Identity, packet, NecLogType.PacketOut, serverType);

            WritePacket(logPacket);
        }
コード例 #7
0
        public void LogUnknownIncomingPacket(NecConnection connection, NecPacket packet, ServerType serverType)
        {
            NecClient client = connection.client;

            if (client != null)
            {
                LogUnknownIncomingPacket(client, packet, serverType);
                return;
            }

            if (!_setting.logIncomingPackets)
            {
                return;
            }

            NecLogPacket logPacket =
                new NecLogPacket(connection.identity, packet, NecLogType.PacketUnhandled, serverType);

            WritePacket(logPacket);
        }
コード例 #8
0
 private void WritePacket(NecLogPacket packet)
 {
     Write(LogLevel.Info, packet.ToLogText(), packet);
 }
コード例 #9
0
 public void Packet(NecLogPacket packet)
 {
     Write(LogLevel.Info, packet.LogType, packet.ToLogText());
 }