|
- 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 : IDisposable
- {
- string Endpoint { get; }
-
- IMqttPacketSerializer PacketSerializer { get; }
-
- event EventHandler ReadingPacketStarted;
-
- event EventHandler ReadingPacketCompleted;
-
- Task ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken);
-
- Task DisconnectAsync(TimeSpan timeout, CancellationToken cancellationToken);
-
- Task SendPacketsAsync(TimeSpan timeout, IEnumerable<MqttBasePacket> packets, CancellationToken cancellationToken);
-
- Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout, CancellationToken cancellationToken);
- }
- }
|