您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

23 行
639 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. using MQTTnet.Core.Packets;
  6. using MQTTnet.Core.Serializer;
  7. namespace MQTTnet.Core.Adapter
  8. {
  9. public interface IMqttCommunicationAdapter
  10. {
  11. IMqttPacketSerializer PacketSerializer { get; }
  12. Task ConnectAsync(TimeSpan timeout);
  13. Task DisconnectAsync(TimeSpan timeout);
  14. Task SendPacketsAsync(TimeSpan timeout, CancellationToken cancellationToken, IEnumerable<MqttBasePacket> packets);
  15. Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout, CancellationToken cancellationToken);
  16. }
  17. }