using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MQTTnet.Packets; using MQTTnet.Serializer; namespace MQTTnet.Adapter { public interface IMqttChannelAdapter { IMqttPacketSerializer PacketSerializer { get; } Task ConnectAsync(TimeSpan timeout); Task DisconnectAsync(TimeSpan timeout); Task SendPacketsAsync(TimeSpan timeout, CancellationToken cancellationToken, IEnumerable packets); Task ReceivePacketAsync(TimeSpan timeout, CancellationToken cancellationToken); } }