Class MqttMsgSuback
- Namespace
- nanoFramework.M2Mqtt.Messages
- Assembly
- nanoFramework.M2Mqtt.dll
Class for SUBACK message from broker to client
public class MqttMsgSuback : MqttMsgBase
- Inheritance
-
MqttMsgSuback
- Inherited Members
- Extension Methods
Constructors
MqttMsgSuback()
Constructor
public MqttMsgSuback()
Properties
GrantedQoSLevels
List of granted QOS Levels
public MqttQoSLevel[] GrantedQoSLevels { get; set; }
Property Value
Reason
The Reason as a string, v5.0 only
public string Reason { get; set; }
Property Value
ReasonCodes
List of granted Reasons, v5.0 only
public MqttReasonCode[] ReasonCodes { get; set; }
Property Value
Remarks
In v5.0, replaces the GrantedQoSLevels, still the cast will be done in the GrantedQoSLevels.
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 SUBACK message
public static MqttMsgSuback Parse(byte fixedHeaderFirstByte, MqttProtocolVersion protocolVersion, IMqttNetworkChannel channel)
Parameters
fixedHeaderFirstByte
byteFirst fixed header byte
protocolVersion
MqttProtocolVersionMQTT Protocol Version
channel
IMqttNetworkChannelChannel connected to the broker
Returns
- MqttMsgSuback
SUBACK message instance
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.