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