Class MqttMsgConnect
- Namespace
- nanoFramework.M2Mqtt.Messages
- Assembly
- nanoFramework.M2Mqtt.dll
Class for CONNECT message from client to broker
public class MqttMsgConnect : MqttMsgBase
- Inheritance
-
MqttMsgConnect
- Inherited Members
- Extension Methods
Constructors
MqttMsgConnect()
Constructor
public MqttMsgConnect()
MqttMsgConnect(string)
Constructor
public MqttMsgConnect(string clientId)
Parameters
clientId
stringClient identifier
MqttMsgConnect(string, string, string, bool, MqttQoSLevel, bool, string, string, bool, ushort, MqttProtocolVersion)
Constructor
public MqttMsgConnect(string clientId, string username, string password, bool willRetain, MqttQoSLevel willQosLevel, bool willFlag, string willTopic, string willMessage, bool cleanSession, ushort keepAlivePeriod, MqttProtocolVersion protocolVersion)
Parameters
clientId
stringClient identifier
username
stringUsername
password
stringPassword
willRetain
boolWill retain flag
willQosLevel
MqttQoSLevelWill QOS level
willFlag
boolWill flag
willTopic
stringWill topic
willMessage
stringWill message
cleanSession
boolClean sessione flag
keepAlivePeriod
ushortKeep alive period
protocolVersion
MqttProtocolVersionMQTT Protocol version
Properties
AuthenticationData
Authentication Data, v5.0 only
public byte[] AuthenticationData { get; set; }
Property Value
- byte[]
AuthenticationMethod
Authentication Method, v5.0 only
public string AuthenticationMethod { get; set; }
Property Value
CleanSession
Clean session flag
public bool CleanSession { get; set; }
Property Value
ClientId
Client identifier
public string ClientId { get; set; }
Property Value
KeepAlivePeriod
Keep alive period
public ushort KeepAlivePeriod { get; set; }
Property Value
Password
Password
public string Password { get; set; }
Property Value
ProtocolName
Protocol name
public string ProtocolName { get; set; }
Property Value
ProtocolVersion
Protocol version
public MqttProtocolVersion ProtocolVersion { get; set; }
Property Value
ReceiveMaximum
ReceiveMaximum, v5.0 only
public ushort ReceiveMaximum { get; set; }
Property Value
RequestProblemInformation
Request Problem Information, v5.0 only
public bool RequestProblemInformation { get; set; }
Property Value
RequestResponseInformation
Request Response Information, v5.0 only
public bool RequestResponseInformation { get; set; }
Property Value
SessionExpiryInterval
Session Expiry Interval, v5.0 only
public uint SessionExpiryInterval { get; set; }
Property Value
TopicAliasMaximum
TopicAliasMaximum, v5.0 only
public ushort TopicAliasMaximum { get; set; }
Property Value
Username
Username
public string Username { get; set; }
Property Value
WillDelayInterval
Will Delay Interval, v5.0 only
public uint WillDelayInterval { get; set; }
Property Value
WillFlag
Will flag
public bool WillFlag { get; set; }
Property Value
WillMessage
Will message
public string WillMessage { get; set; }
Property Value
WillQosLevel
Will QOS level
public byte WillQosLevel { get; set; }
Property Value
WillRetain
Will retain flag
public bool WillRetain { get; set; }
Property Value
WillTopic
Will topic
public string WillTopic { get; set; }
Property Value
Methods
GetBytes(MqttProtocolVersion)
public override byte[] GetBytes(MqttProtocolVersion protocolVersion)
Parameters
protocolVersion
MqttProtocolVersionMQTT protocol version
Returns
- byte[]
Parse(byte, MqttProtocolVersion, IMqttNetworkChannel)
Parse bytes for a CONNECT message
public static MqttMsgConnect Parse(byte fixedHeaderFirstByte, MqttProtocolVersion protocolVersion, IMqttNetworkChannel channel)
Parameters
fixedHeaderFirstByte
byteFirst fixed header byte
protocolVersion
MqttProtocolVersionMQTT Protocol Version
channel
IMqttNetworkChannelChannel connected to the broker
Returns
- MqttMsgConnect
CONNECT message instance
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.