mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
23 lines
632 B
C#
23 lines
632 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MQTTnet.Packets;
|
|
using MQTTnet.Serializer;
|
|
|
|
namespace MQTTnet.Adapter
|
|
{
|
|
public interface IMqttChannelAdapter : IDisposable
|
|
{
|
|
IMqttPacketSerializer PacketSerializer { get; }
|
|
|
|
Task ConnectAsync(TimeSpan timeout);
|
|
|
|
Task DisconnectAsync(TimeSpan timeout);
|
|
|
|
Task SendPacketsAsync(TimeSpan timeout, CancellationToken cancellationToken, IEnumerable<MqttBasePacket> packets);
|
|
|
|
Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout, CancellationToken cancellationToken);
|
|
}
|
|
}
|