|
|
@@ -4,7 +4,6 @@ |
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Threading; |
|
|
|
|
|
|
|
namespace MQTTnet.Server |
|
|
@@ -12,43 +11,45 @@ namespace MQTTnet.Server |
|
|
|
public sealed class InterceptingUnsubscriptionEventArgs : EventArgs |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// Gets the client identifier. |
|
|
|
/// Hint: This identifier needs to be unique over all used clients / devices on the broker to avoid connection issues. |
|
|
|
/// Gets the cancellation token which can indicate that the client connection gets down. |
|
|
|
/// </summary> |
|
|
|
public string ClientId { get; internal set; } |
|
|
|
public CancellationToken CancellationToken { get; internal set; } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets the MQTT topic. |
|
|
|
/// In MQTT, the word topic refers to an UTF-8 string that the broker uses to filter messages for each connected client. |
|
|
|
/// The topic consists of one or more topic levels. Each topic level is separated by a forward slash (topic level separator). |
|
|
|
/// Gets the client identifier. |
|
|
|
/// Hint: This identifier needs to be unique over all used clients / devices on the broker to avoid connection issues. |
|
|
|
/// </summary> |
|
|
|
public string Topic { get; internal set; } |
|
|
|
public string ClientId { get; internal set; } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets a key/value collection that can be used to share data within the scope of this session. |
|
|
|
/// Gets or sets whether the broker should close the client connection. |
|
|
|
/// </summary> |
|
|
|
public IDictionary SessionItems { get; internal set; } |
|
|
|
public bool CloseConnection { get; set; } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets the response which will be sent to the client via the UNSUBACK pocket. |
|
|
|
/// Gets or sets whether the broker should remove an internal subscription for the client. |
|
|
|
/// The broker can also avoid this and return "success" to the client. |
|
|
|
/// This feature allows using the MQTT Broker as the Frontend and another system as the backend. |
|
|
|
/// </summary> |
|
|
|
public UnsubscribeResponse Response { get; } = new UnsubscribeResponse(); |
|
|
|
|
|
|
|
public bool ProcessUnsubscription { get; set; } = true; |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets whether the broker should remove an internal subscription for the client. |
|
|
|
/// The broker can also avoid this and return "success" to the client. |
|
|
|
/// This feature allows using the MQTT Broker as the Frontend and another system as the backend. |
|
|
|
/// Gets the response which will be sent to the client via the UNSUBACK pocket. |
|
|
|
/// </summary> |
|
|
|
public bool ProcessUnsubscription { get; set; } = true; |
|
|
|
|
|
|
|
public UnsubscribeResponse Response { get; } = new UnsubscribeResponse(); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets or sets whether the broker should close the client connection. |
|
|
|
/// Gets or sets a key/value collection that can be used to share data within the scope of this session. |
|
|
|
/// </summary> |
|
|
|
public bool CloseConnection { get; set; } |
|
|
|
|
|
|
|
public IDictionary SessionItems { get; internal set; } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets the cancellation token which can indicate that the client connection gets down. |
|
|
|
/// Gets or sets the MQTT topic. |
|
|
|
/// In MQTT, the word topic refers to an UTF-8 string that the broker uses to filter messages for each connected |
|
|
|
/// client. |
|
|
|
/// The topic consists of one or more topic levels. Each topic level is separated by a forward slash (topic level |
|
|
|
/// separator). |
|
|
|
/// </summary> |
|
|
|
public CancellationToken CancellationToken { get; internal set; } |
|
|
|
public string Topic { get; internal set; } |
|
|
|
} |
|
|
|
} |
|
|
|
} |