Exemplo n.º 1
0
 public void LogOutgoingPacket(EzClient client, EzPacket packet)
 {
     if (_logOutgoingPackets)
     {
         EzLogPacket logPacket = new EzLogPacket(client, packet, EzLogPacketType.Out);
         Packet(logPacket);
     }
 }
Exemplo n.º 2
0
 public void LogIncomingPacket(EzClient client, EzPacket packet)
 {
     if (_logIncomingPackets)
     {
         EzLogPacket logPacket = new EzLogPacket(client, packet, EzLogPacketType.In);
         Packet(logPacket);
     }
 }
Exemplo n.º 3
0
 public void LogUnknownIncommingPacket(EzClient client, EzPacket packet)
 {
     if (_logUnknownIncomingPackets)
     {
         EzLogPacket logPacket = new EzLogPacket(client, packet, EzLogPacketType.Unhandeled);
         Packet(logPacket);
     }
 }
Exemplo n.º 4
0
        private void OnEzPacketLogged(EzLogPacket logPacket)
        {
            EventHandler <EzPacketLoggedEventArgs> ezPacketLogged = EzPacketLogged;

            if (ezPacketLogged != null)
            {
                EzPacketLoggedEventArgs ezPacketLoggedEventArgs = new EzPacketLoggedEventArgs(logPacket);
                ezPacketLogged(this, ezPacketLoggedEventArgs);
            }
        }
Exemplo n.º 5
0
 public EzPacketLoggedEventArgs(EzLogPacket packet)
 {
     this.Packet = packet;
 }
Exemplo n.º 6
0
 public void Packet(EzLogPacket packet)
 {
     Write(LogLevel.Info, packet.ToLogText());
     OnEzPacketLogged(packet);
 }