コード例 #1
0
 internal void parsePacket(Detrav.Sniffer.Tera.TeraPacket teraPacket)
 {
     lock (packets)
     {
         packets.Add(new DataPacket(packets.Count, teraPacket));
     }
 }
コード例 #2
0
 public TeraPacketParser(TeraPacket packet)
     : base(packet.data, packet.type)
 {
     //ms = new MemoryStream(packet.data);
     //br = new BinaryReader(ms);
     elements = new List <PacketElement>();
     readUInt16(0, "size");
     readUInt16(2, "opcode");
 }
コード例 #3
0
 public static TeraPacketParser create(TeraPacket packet)
 {
     switch (Instance.version)
     {
     case OpCodeVersion.P2805:
         Type p;
         if (Instance.opCodes2805.TryGetValue(packet.opCode, out p))
         {
             return((TeraPacketParser)Activator.CreateInstance(p, packet));
         }
         return(new TeraPacketParser(packet));
     }
     return(null);
 }