Example #1
0
 public override void ReceivePacketSpec(StreamIO streamIO, AES aes)
 {
     name     = Encoding.Unicode.GetString(ReceiveBytes(aes));
     time     = DateTime.Parse(Encoding.Unicode.GetString(ReceiveBytes(aes)));
     cpuusage = Encoding.Unicode.GetString(ReceiveBytes(aes));
     ramusage = Encoding.Unicode.GetString(ReceiveBytes(aes));
 }
Example #2
0
 public override void SendPacketSpec(StreamIO streamIO, AES aes)
 {
     SendBytes(Encoding.Unicode.GetBytes(name), aes);
     SendBytes(Encoding.Unicode.GetBytes(time.ToString()), aes);
     SendBytes(Encoding.Unicode.GetBytes(cpuusage), aes);
     SendBytes(Encoding.Unicode.GetBytes(ramusage), aes);
 }
Example #3
0
 public override void ReceivePacketSpec(StreamIO streamIO, AES aes)
 {
     cliInput     = Encoding.Unicode.GetString(ReceiveBytes(aes));
     consoleWidth = (int)DeSer(ReceiveBytes(aes), typeof(Int32));
     serverAnswer = Encoding.Unicode.GetString(ReceiveBytes(aes));
 }
Example #4
0
 public abstract void ReceivePacketSpec(StreamIO streamIO, AES aes);
Example #5
0
 public override void SendPacketSpec(StreamIO streamIO, AES aes)
 {
     SendBytes(Encoding.Unicode.GetBytes(cliInput), aes);
     SendBytes(Ser(consoleWidth), aes);
     SendBytes(Encoding.Unicode.GetBytes(serverAnswer), aes);
 }
Example #6
0
 public Packet(NetworkStream stream, uint packetType)
 {
     _streamIO   = new StreamIO(stream);
     _packetType = packetType;
 }
Example #7
0
 public abstract void SendPacketSpec(StreamIO streamIO, AES aes);
Example #8
0
 public override void ReceivePacketSpec(StreamIO streamIO, AES aes)
 {
     serverHeader  = ReceiveBytes(aes);
     serverVersion = ReceiveBytes(aes);
 }
Example #9
0
        /* TYPE               UINT
         *
         * NullPacket       | 0
         * DataPacket       | 1
         * LoginPacket      | 2
         * SSLPacket        | 3
         * CLIPacket        | 4
         * ServerInfoPacket | 5
         *
         */

        public Packet(Stream stream)
        {
            _streamIO = new StreamIO(stream);
        }
Example #10
0
 public override void SendPacketSpec(StreamIO streamIO, AES aes)
 {
     SendBytes(serverHeader, aes);
     SendBytes(serverVersion, aes);
 }
Example #11
0
 public override void ReceivePacketSpec(StreamIO streamIO, AES aes)
 {
     data = ReceiveBytes(aes);
 }
Example #12
0
 public override void SendPacketSpec(StreamIO streamIO, AES aes)
 {
     SendBytes(data, aes);
 }
Example #13
0
 public override void ReceivePacketSpec(StreamIO streamIO, AES aes)
 {
     data = Encoding.Unicode.GetString(ReceiveBytes(aes));
 }
Example #14
0
 public override void SendPacketSpec(StreamIO streamIO, AES aes)
 {
     SendBytes(Encoding.Unicode.GetBytes(data), aes);
 }