public MqttConnectionContext( IMqttPacketSerializer packetSerializer, ConnectionContext connection) { PacketSerializer = packetSerializer; Connection = connection; }
public MqttChannelAdapter(IMqttChannel channel, IMqttPacketSerializer serializer, IMqttNetChildLogger logger) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _channel = channel ?? throw new ArgumentNullException(nameof(channel)); PacketSerializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _logger = logger.CreateChildLogger(nameof(MqttChannelAdapter)); }
public MqttChannelAdapter(IMqttChannel channel, IMqttPacketSerializer serializer, IMqttNetLogger logger) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _channel = channel ?? throw new ArgumentNullException(nameof(channel)); PacketSerializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); }
private Task _sendTask = Task.FromResult(0); // this task is used to prevent overlapping write public MqttChannelCommunicationAdapter(IMqttCommunicationChannel channel, IMqttPacketSerializer serializer) { _channel = channel ?? throw new ArgumentNullException(nameof(channel)); PacketSerializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); }
public static bool TryDeserialize(this IMqttPacketSerializer serializer, in ReadOnlySequence <byte> input, out MqttBasePacket packet, out SequencePosition consumed, out SequencePosition observed)