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); /// /// get the currently available number of bytes without reading them /// int Peek(); Task> ReadAsync(int length, byte[] buffer); } }