Esempio n. 1
0
 public IncomingPacket(string _Data)
 {
     Packet    = _Data;
     tmpPacket = Packet.Substring(6);
     Length    = Decoders.Bit8(Packet.Substring(2, 2));
     Header    = Decoders.Bit8(Packet.Substring(4, 2));
 }
Esempio n. 2
0
 public int GetNextInt()
 {
     try
     {
         int Result = Decoders.Bit24(tmpPacket.Substring(0, 4));
         tmpPacket = tmpPacket.Substring(4);
         return(Result);
     }
     catch
     {
         return(1);
     }
 }
Esempio n. 3
0
 public string GetNextString()
 {
     try
     {
         int Length = Decoders.Bit8(tmpPacket.Substring(0, 2));
         tmpPacket = tmpPacket.Substring(2);
         string Result = tmpPacket.Substring(0, Length);
         tmpPacket = tmpPacket.Substring(Length);
         return(Result);
     }
     catch
     {
         return(null);
     }
 }