/* M2Mqtt - MQTT Client Library for .Net Copyright (c) 2014, Paolo Patierno, All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. */ using System; using System.Text; namespace uPLibrary.Networking.M2Mqtt { /// /// Interface for channel under MQTT library /// public interface IMqttNetworkChannel { /// /// Data available on channel /// bool DataAvailable { get; } /// /// Receive data from the network channel /// /// Data buffer for receiving data /// Number of bytes received int Receive(byte[] buffer); /// /// Send data on the network channel to the broker /// /// Data buffer to send /// Number of byte sent int Send(byte[] buffer); /// /// Close the network channel /// void Close(); /// /// Connect to remote server /// void Connect(); } }