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); }
// Decoding public static Int32 DecodePacketLen(Byte[] data, ref Int32 offset) { return(PacketUtil.DecodeInt32(data, ref offset)); }