Class ValidatingConnectionEventArgs
public sealed class ValidatingConnectionEventArgs : EventArgs
- Inheritance
-
ValidatingConnectionEventArgs
- Inherited Members
Constructors
ValidatingConnectionEventArgs(MqttConnectPacket, IMqttChannelAdapter, IDictionary)
public ValidatingConnectionEventArgs(MqttConnectPacket connectPacket, IMqttChannelAdapter clientAdapter, IDictionary sessionItems)
Parameters
connectPacket
MqttConnectPacketclientAdapter
IMqttChannelAdaptersessionItems
IDictionary
Properties
AssignedClientIdentifier
Gets or sets the assigned client identifier. MQTTv5 only.
public string AssignedClientIdentifier { get; set; }
Property Value
AuthenticationData
Gets or sets the authentication data.
public byte[] AuthenticationData { get; }
Property Value
- byte[]
AuthenticationMethod
Gets or sets the authentication method.
public string AuthenticationMethod { get; }
Property Value
ChannelAdapter
Gets the channel adapter. This can be a MqttConnectionContext (used in ASP.NET), a MqttChannelAdapter (used for TCP or WebSockets) or a custom implementation.
public IMqttChannelAdapter ChannelAdapter { get; }
Property Value
CleanSession
Gets or sets a value indicating whether clean sessions are used or not. When a client connects to a broker it can connect using either a non persistent connection (clean session) or a persistent connection. With a non persistent connection the broker doesn't store any subscription information or undelivered messages for the client. This mode is ideal when the client only publishes messages. It can also connect as a durable client using a persistent connection. In this mode, the broker will store subscription information, and undelivered messages for the client.
public bool? CleanSession { get; }
Property Value
- bool?
ClientCertificate
public X509Certificate2 ClientCertificate { get; }
Property Value
ClientId
Gets the client identifier. Hint: This identifier needs to be unique over all used clients / devices on the broker to avoid connection issues.
public string ClientId { get; }
Property Value
Endpoint
public string Endpoint { get; }
Property Value
IsSecureConnection
public bool IsSecureConnection { get; }
Property Value
KeepAlivePeriod
Gets or sets the keep alive period. The connection is normally left open by the client so that is can send and receive data at any time. If no data flows over an open connection for a certain time period then the client will generate a PINGREQ and expect to receive a PINGRESP from the broker. This message exchange confirms that the connection is open and working. This period is known as the keep alive period.
public ushort? KeepAlivePeriod { get; }
Property Value
MaximumPacketSize
A value of 0 indicates that the value is not used.
public uint MaximumPacketSize { get; }
Property Value
Password
public string Password { get; }
Property Value
ProtocolVersion
public MqttProtocolVersion ProtocolVersion { get; }
Property Value
RawPassword
public byte[] RawPassword { get; }
Property Value
- byte[]
ReasonCode
Gets or sets the reason code. When a MQTTv3 client connects the enum value must be one which is
also supported in MQTTv3. Otherwise the connection attempt will fail because not all codes can be
converted properly.
public MqttConnectReasonCode ReasonCode { get; set; }
Property Value
ReasonString
public string ReasonString { get; set; }
Property Value
ReceiveMaximum
Gets or sets the receive maximum. This gives the maximum length of the receive messages. A value of 0 indicates that the value is not used.
public ushort ReceiveMaximum { get; }
Property Value
RequestProblemInformation
Gets the request problem information.
public bool RequestProblemInformation { get; }
Property Value
RequestResponseInformation
Gets the request response information.
public bool RequestResponseInformation { get; }
Property Value
ResponseAuthenticationData
Gets or sets the response authentication data.
public byte[] ResponseAuthenticationData { get; set; }
Property Value
- byte[]
ResponseUserProperties
Gets or sets the response user properties.
In MQTT 5, user properties are basic UTF-8 string key-value pairs that you can append to almost every type of MQTT
packet.
As long as you don’t exceed the maximum message size, you can use an unlimited number of user properties to add
metadata to MQTT messages and pass information between publisher, broker, and subscriber.
The feature is very similar to the HTTP header concept.
public List<MqttUserProperty> ResponseUserProperties { get; set; }
Property Value
ServerReference
Gets or sets the server reference. This can be used together with i.e. "Server Moved" to send
a different server address to the client.
public string ServerReference { get; set; }
Property Value
SessionExpiryInterval
Gets the session expiry interval. The time after a session expires when it's not actively used. A value of 0 means no expiation.
public uint SessionExpiryInterval { get; }
Property Value
SessionItems
Gets or sets a key/value collection that can be used to share data within the scope of this session.
public IDictionary SessionItems { get; }
Property Value
TopicAliasMaximum
Gets or sets the topic alias maximum. This gives the maximum length of the topic alias. A value of 0 indicates that the value is not used.
public ushort TopicAliasMaximum { get; }
Property Value
UserName
public string UserName { get; }
Property Value
UserProperties
Gets or sets the user properties.
In MQTT 5, user properties are basic UTF-8 string key-value pairs that you can append to almost every type of MQTT
packet.
As long as you don’t exceed the maximum message size, you can use an unlimited number of user properties to add
metadata to MQTT messages and pass information between publisher, broker, and subscriber.
The feature is very similar to the HTTP header concept.
public List<MqttUserProperty> UserProperties { get; }
Property Value
Username
[Obsolete("This property name has a typo. Use 'UserName' instead. This one will be removed soon.")]
public string Username { get; }
Property Value
WillDelayInterval
Gets or sets the will delay interval. This is the time between the client disconnect and the time the will message will be sent. A value of 0 indicates that the value is not used.
public uint WillDelayInterval { get; }