Class MqttMsgDisconnect
- Namespace
- nanoFramework.M2Mqtt.Messages
- Assembly
- nanoFramework.M2Mqtt.dll
Class for DISCONNECT message from client to broker
public class MqttMsgDisconnect : MqttMsgBase
- Inheritance
-
MqttMsgDisconnect
- Inherited Members
- Extension Methods
Constructors
MqttMsgDisconnect()
Constructor
public MqttMsgDisconnect()
Properties
Reason
The Reason as a string, v5.0 only
public string Reason { get; set; }
Property Value
ResonCode
Reason Code, v5.0 only
public MqttReasonCode ResonCode { get; set; }
Property Value
ServerReference
Used by the Client to identify another Server to use, v5.0 only
public string ServerReference { get; set; }
Property Value
SessionExpiryInterval
Session Expiry Interval, v5.0 only
public uint SessionExpiryInterval { get; set; }
Property Value
Methods
GetBytes(MqttProtocolVersion)
Returns the bytes that represents the current object.
public override byte[] GetBytes(MqttProtocolVersion protocolVersion)
Parameters
protocolVersion
MqttProtocolVersionMQTT protocol version
Returns
- byte[]
An array of bytes that represents the current object.
Parse(byte, MqttProtocolVersion, IMqttNetworkChannel)
Parse bytes for a DISCONNECT message
public static MqttMsgDisconnect Parse(byte fixedHeaderFirstByte, MqttProtocolVersion protocolVersion, IMqttNetworkChannel channel)
Parameters
fixedHeaderFirstByte
byteFirst fixed header byte
protocolVersion
MqttProtocolVersionMQTT Protocol Version
channel
IMqttNetworkChannelChannel connected to the broker
Returns
- MqttMsgDisconnect
DISCONNECT message instance
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.