Add cancellation token to adapter

This commit is contained in:
Christian Kratky
2017-09-19 23:06:45 +02:00
parent 305578e7e6
commit e7c8d1c1c1
13 changed files with 216 additions and 146 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MQTTnet.Core.Client;
using MQTTnet.Core.Packets;
@@ -15,8 +16,8 @@ namespace MQTTnet.Core.Adapter
Task DisconnectAsync(TimeSpan timeout);
Task SendPacketsAsync(TimeSpan timeout, IEnumerable<MqttBasePacket> packets);
Task SendPacketsAsync(TimeSpan timeout, CancellationToken cancellationToken, IEnumerable<MqttBasePacket> packets);
Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout);
Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout, CancellationToken cancellationToken);
}
}