mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
23 lines
512 B
C#
23 lines
512 B
C#
using System.Threading.Tasks;
|
|
using MQTTnet.Core.Client;
|
|
using System;
|
|
|
|
namespace MQTTnet.Core.Channel
|
|
{
|
|
public interface IMqttCommunicationChannel
|
|
{
|
|
Task ConnectAsync(MqttClientOptions options);
|
|
|
|
Task DisconnectAsync();
|
|
|
|
Task WriteAsync(byte[] buffer);
|
|
|
|
/// <summary>
|
|
/// get the currently available number of bytes without reading them
|
|
/// </summary>
|
|
int Peek();
|
|
|
|
Task<ArraySegment<byte>> ReadAsync(int length, byte[] buffer);
|
|
}
|
|
}
|