Add statistics of last sent packets to the _ConnectedClient_.

This commit is contained in:
Christian Kratky
2017-11-28 21:19:30 +01:00
parent bc959a8c3d
commit 0ee3c8e135
8 changed files with 137 additions and 68 deletions
@@ -33,14 +33,14 @@ namespace MQTTnet.Adapter
public Task ConnectAsync(TimeSpan timeout)
{
_logger.Info<MqttChannelAdapter>("Connecting [Timeout={0}]", timeout);
_logger.Trace<MqttChannelAdapter>("Connecting [Timeout={0}]", timeout);
return ExecuteAndWrapExceptionAsync(() => _channel.ConnectAsync().TimeoutAfter(timeout));
}
public Task DisconnectAsync(TimeSpan timeout)
{
_logger.Info<MqttChannelAdapter>("Disconnecting [Timeout={0}]", timeout);
_logger.Trace<MqttChannelAdapter>("Disconnecting [Timeout={0}]", timeout);
return ExecuteAndWrapExceptionAsync(() => _channel.DisconnectAsync().TimeoutAfter(timeout));
}