Beispiel #1
0
        public static string Deserialize(IInOctetStream stream)
        {
            var myNonce    = stream.ReadUint8();
            var characters = stream.ReadOctets(myNonce);

            return(Encoding.UTF8.GetString(characters));
        }
Beispiel #2
0
        void ReadConnectionPacket(IInOctetStream stream, long nowMs)
        {
            var packetId = HandleTend(stream, nowMs);
            var count    = stream.RemainingOctetCount;
            var payload  = stream.ReadOctets(count);

            incomingPacketBuffer.AddPacket(packetId, payload);
        }
Beispiel #3
0
        public static CustomConnectPayload Deserialize(IInOctetStream stream)
        {
            var octetCount = stream.ReadUint8();
            var octets     = stream.ReadOctets(octetCount);

            return(new CustomConnectPayload {
                Payload = octets
            });
        }