Exemple #1
0
        public MqttConnectionContext(MqttPacketFormatterAdapter packetFormatterAdapter, ConnectionContext connection)
        {
            PacketFormatterAdapter = packetFormatterAdapter ?? throw new ArgumentNullException(nameof(packetFormatterAdapter));
            Connection             = connection ?? throw new ArgumentNullException(nameof(connection));

            if (Connection.Transport != null)
            {
                _input  = Connection.Transport.Input;
                _output = Connection.Transport.Output;
            }

            _reader = new SpanBasedMqttPacketBodyReader();
        }
Exemple #2
0
 public static bool TryDecode(this MqttPacketFormatterAdapter formatter,
                              SpanBasedMqttPacketBodyReader reader,
                              in ReadOnlySequence <byte> input,