Пример #1
0
        public static void Serialize(IOutOctetStream stream, string value)
        {
            var octets = Encoding.UTF8.GetBytes(value);

            stream.WriteUint8((byte)octets.Length);
            stream.WriteOctets(octets);
        }
 public static void Serialize(IOutOctetStream stream, UniqueSessionID sessionId)
 {
     stream.WriteUint8((byte)sessionId.Value.Length);
     stream.WriteOctets(sessionId.Value);
 }
Пример #3
0
 public static void Serialize(IOutOctetStream stream, CustomConnectPayload payload)
 {
     stream.WriteUint8((byte)payload.Payload.Length);
     stream.WriteOctets(payload.Payload);
 }