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

17 行
541 B

  1. using System;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. using MQTTnet.Packets;
  5. namespace MQTTnet.Adapter
  6. {
  7. public static class MqttChannelAdapterExtensions
  8. {
  9. public static Task SendPacketsAsync(this IMqttChannelAdapter adapter, TimeSpan timeout, CancellationToken cancellationToken, params MqttBasePacket[] packets)
  10. {
  11. if (adapter == null) throw new ArgumentNullException(nameof(adapter));
  12. return adapter.SendPacketsAsync(timeout, cancellationToken, packets);
  13. }
  14. }
  15. }