Table of Contents

Class ClientDisconnectedEventArgs

Namespace
MQTTnet.Server
Assembly
MQTTnet.dll
public sealed class ClientDisconnectedEventArgs : EventArgs
Inheritance
ClientDisconnectedEventArgs
Inherited Members

Constructors

ClientDisconnectedEventArgs(string, MqttDisconnectPacket, MqttClientDisconnectType, string, IDictionary)

public ClientDisconnectedEventArgs(string clientId, MqttDisconnectPacket disconnectPacket, MqttClientDisconnectType disconnectType, string endpoint, IDictionary sessionItems)

Parameters

clientId string
disconnectPacket MqttDisconnectPacket
disconnectType MqttClientDisconnectType
endpoint string
sessionItems IDictionary

Properties

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

string

DisconnectType

public MqttClientDisconnectType DisconnectType { get; }

Property Value

MqttClientDisconnectType

Endpoint

public string Endpoint { get; }

Property Value

string

ReasonCode

Gets the reason code sent by the client. Only available for clean disconnects. MQTT 5.0.0+ feature.

public MqttDisconnectReasonCode? ReasonCode { get; }

Property Value

MqttDisconnectReasonCode?

ReasonString

Gets the reason string sent by the client. Only available for clean disconnects. MQTT 5.0.0+ feature.

public string ReasonString { get; }

Property Value

string

SessionExpiryInterval

Gets the session expiry interval sent by the client. Only available for clean disconnects. MQTT 5.0.0+ feature.

public uint SessionExpiryInterval { get; }

Property Value

uint

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

IDictionary

UserProperties

Gets the user properties sent by the client. Only available for clean disconnects. MQTT 5.0.0+ feature.

public List<MqttUserProperty> UserProperties { get; }

Property Value

List<MqttUserProperty>