Interface IMqttNetworkChannel
- Namespace
- nanoFramework.M2Mqtt
- Assembly
- nanoFramework.M2Mqtt.dll
Interface for channel under MQTT library
public interface IMqttNetworkChannel
- Extension Methods
Properties
DataAvailable
Data available on channel
bool DataAvailable { get; }
Property Value
ValidateServerCertificate
True to check the certificate when connecting using TLS. Disabling this property will bypass the validation of the server root CA certificate. Using the library this way it's unsecured and, therefore, not recommended.
bool ValidateServerCertificate { get; set; }
Property Value
Methods
Accept()
Accept client connection
void Accept()
Close()
Close the network channel
void Close()
Connect()
Connect to remote server
void Connect()
Receive(byte[])
Receive data from the network channel
int Receive(byte[] buffer)
Parameters
buffer
byte[]Data buffer for receiving data
Returns
- int
Number of bytes received
Receive(byte[], int)
Receive data from the network channel with a specified timeout
int Receive(byte[] buffer, int timeout)
Parameters
Returns
- int
Number of bytes received
Send(byte[])
Send data on the network channel to the broker
int Send(byte[] buffer)
Parameters
buffer
byte[]Data buffer to send
Returns
- int
Number of byte sent