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.

MqttCommunicationAdapterExtensions.cs 563 B

1234567891011121314151617
  1. using System;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. using MQTTnet.Core.Packets;
  5. namespace MQTTnet.Core.Adapter
  6. {
  7. public static class MqttCommunicationAdapterExtensions
  8. {
  9. public static Task SendPacketsAsync(this IMqttCommunicationAdapter 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. }