Esempio n. 1
0
        public static void DumpPacket(byte[] buff, Player.PlayerInfo player)
        {
            Thread     t = new Thread(ThreadPacketDump);
            DumpStruct d = new DumpStruct();

            d.buff   = buff;
            d.player = player;
            t.Start(d);
        }
Esempio n. 2
0
        public static void ThreadPacketDump(object objs)
        {
            DumpStruct d = (DumpStruct)objs;

            byte[] buff = d.buff;
            lock (_sync)
            {
                FileStream fs = new FileStream(loc + "logs\\" + PacketLogFile + "_" + d.player.timestring + "_" + d.player.ID.ToString("00") + ".bin", FileMode.Append, FileAccess.Write);
                fs.Write(buff, 0, buff.Length);
                fs.Close();
            }
        }