Table of Contents

Class MqttMsgPubrec

Namespace
nanoFramework.M2Mqtt.Messages
Assembly
nanoFramework.M2Mqtt.dll

Class for PUBREC message from broker to client

public class MqttMsgPubrec : MqttMsgBase
Inheritance
MqttMsgPubrec
Inherited Members
Extension Methods

Constructors

MqttMsgPubrec()

Constructor

public MqttMsgPubrec()

Properties

Reason

The Reason as a string, v5.0 only

public string Reason { get; set; }

Property Value

string

ReasonCode

Return Code, v5.0 only

public MqttReasonCode ReasonCode { get; set; }

Property Value

MqttReasonCode

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 PUBREC message

public static MqttMsgPubrec 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

MqttMsgPubrec

PUBREC message instance

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.