Add more handling options to interceptor contexts.

This commit is contained in:
Christian
2021-10-26 22:00:47 +02:00
parent 131afc6ff2
commit 905306c312
55 changed files with 943 additions and 509 deletions
+4 -4
View File
@@ -116,11 +116,11 @@ namespace MQTTnet.Adapter
var packetData = PacketFormatterAdapter.Encode(packet);
_packetInspectorHandler.BeginSendPacket(packetData);
await _channel.WriteAsync(packetData.Array, packetData.Offset, packetData.Count, cancellationToken).ConfigureAwait(false);
await packetData.WriteToAsync(_channel, cancellationToken).ConfigureAwait(false);
Interlocked.Add(ref _bytesReceived, packetData.Length);
Interlocked.Add(ref _bytesReceived, packetData.Count);
_logger.Verbose("TX ({0} bytes) >>> {1}", packetData.Count, packet);
_logger.Verbose("TX ({0} bytes) >>> {1}", packetData.Length, packet);
}
catch (Exception exception)
{