Exemple #1
0
        public static PacketData PacketDecoder(byte[] packetData)
        {
            var packet = new PacketData();
            int bt = 0;
            packet.TaskId = ReadInt(ref bt, packetData);
            packet.NameExe = ReadString(ref bt, packetData);
            packet.NewExe = ReadString(ref bt, packetData);
            packet.CurUser = ReadString(ref bt, packetData);
            packet.CompName = ReadString(ref bt, packetData);
            packet.CompAdr = ReadString(ref bt, packetData);
            packet.StartPeriod = ReadDateTime(ref bt, packetData);
            packet.EndPeriod = ReadDateTime(ref bt, packetData);
            packet.Keybs = ReadInt(ref bt, packetData);
            packet.Mouse = ReadInt(ref bt, packetData);
            packet.Caption = ReadString(ref bt, packetData);
            packet.Screenshot = ReadBytes(ref bt, packetData);
            packet.ExePath = ReadString(ref bt, packetData);
            packet.ActiveTime = ReadDateTime(ref bt, packetData);

            return packet;
        }
Exemple #2
0
 public void SaveData(PacketData item)
 {
     _packets.Enqueue(item);
     _newItemEvent.Set();
 }