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