Exemplo n.º 1
0
        public override bool Unpack(ref UdpBitStream stream, ref object o)
        {
            // read length and create array, then read bytes into array
            byte[] bytes = new byte[stream.ReadInt()];
            stream.ReadByteArray(bytes);

            // convert bytes to string
            o = Encoding.UTF8.GetString(bytes);
            return(true);
        }