Example #1
0
        public override bool Unpack(UdpStream 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);
        }
Example #2
0
        public override bool Unpack(UdpStream 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;
        }