Table of Contents

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

string

ResonCode

Reason Code, v5.0 only

public MqttReasonCode ResonCode { get; set; }

Property Value

MqttReasonCode

ServerReference

Used by the Client to identify another Server to use, v5.0 only

public string ServerReference { get; set; }

Property Value

string

SessionExpiryInterval

Session Expiry Interval, v5.0 only

public uint SessionExpiryInterval { get; set; }

Property Value

uint

Methods

GetBytes(MqttProtocolVersion)

Returns the bytes that represents the current object.

public override byte[] GetBytes(MqttProtocolVersion protocolVersion)

Parameters

protocolVersion MqttProtocolVersion

MQTT 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 byte

First fixed header byte

protocolVersion MqttProtocolVersion

MQTT Protocol Version

channel IMqttNetworkChannel

Channel 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.