You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
530 B

  1. using System;
  2. using System.Threading.Tasks;
  3. using MQTTnet.Core.Client;
  4. using MQTTnet.Core.Packets;
  5. using MQTTnet.Core.Serializer;
  6. namespace MQTTnet.Core.Adapter
  7. {
  8. public interface IMqttCommunicationAdapter
  9. {
  10. Task ConnectAsync(MqttClientOptions options, TimeSpan timeout);
  11. Task DisconnectAsync();
  12. Task SendPacketAsync(MqttBasePacket packet, TimeSpan timeout);
  13. Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout);
  14. IMqttPacketSerializer PacketSerializer { get; }
  15. }
  16. }