mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
17 lines
563 B
C#
17 lines
563 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MQTTnet.Core.Packets;
|
|
|
|
namespace MQTTnet.Core.Adapter
|
|
{
|
|
public static class MqttCommunicationAdapterExtensions
|
|
{
|
|
public static Task SendPacketsAsync(this IMqttCommunicationAdapter adapter, TimeSpan timeout, CancellationToken cancellationToken, params MqttBasePacket[] packets)
|
|
{
|
|
if (adapter == null) throw new ArgumentNullException(nameof(adapter));
|
|
|
|
return adapter.SendPacketsAsync(timeout, cancellationToken, packets);
|
|
}
|
|
}
|
|
} |