Example #1
0
        public static string DecodeString(Byte[] data, ref Int32 offset)
        {
            var    stringLength = PacketUtil.DecodeInt32(data, ref offset);
            string value        = Encoding.ASCII.GetString(data, offset, stringLength);

            offset += stringLength;
            return(value);
        }
Example #2
0
 // Decoding
 public static Int32 DecodePacketLen(Byte[] data, ref Int32 offset)
 {
     return(PacketUtil.DecodeInt32(data, ref offset));
 }