mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
Align default values for connection options with MQTTv5 spec.
This commit is contained in:
@@ -79,13 +79,13 @@ namespace MQTTnet.Client
|
|||||||
/// Gets the request problem information.
|
/// Gets the request problem information.
|
||||||
/// Hint: MQTT 5 feature only.
|
/// Hint: MQTT 5 feature only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool? RequestProblemInformation { get; }
|
bool RequestProblemInformation { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the request response information.
|
/// Gets the request response information.
|
||||||
/// Hint: MQTT 5 feature only.
|
/// Hint: MQTT 5 feature only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool? RequestResponseInformation { get; }
|
bool RequestResponseInformation { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the session expiry interval.
|
/// Gets the session expiry interval.
|
||||||
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
|
|||||||
/// Gets the topic alias maximum.
|
/// Gets the topic alias maximum.
|
||||||
/// This gives the maximum length of the topic alias.
|
/// This gives the maximum length of the topic alias.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ushort? TopicAliasMaximum { get; }
|
ushort TopicAliasMaximum { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the user properties.
|
/// Gets or sets the user properties.
|
||||||
|
|||||||
@@ -79,13 +79,13 @@ namespace MQTTnet.Client
|
|||||||
/// Gets or sets the request problem information.
|
/// Gets or sets the request problem information.
|
||||||
/// Hint: MQTT 5 feature only.
|
/// Hint: MQTT 5 feature only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? RequestProblemInformation { get; set; }
|
public bool RequestProblemInformation { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the request response information.
|
/// Gets or sets the request response information.
|
||||||
/// Hint: MQTT 5 feature only.
|
/// Hint: MQTT 5 feature only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? RequestResponseInformation { get; set; }
|
public bool RequestResponseInformation { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the session expiry interval.
|
/// Gets or sets the session expiry interval.
|
||||||
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
|
|||||||
/// Gets or sets the topic alias maximum.
|
/// Gets or sets the topic alias maximum.
|
||||||
/// This gives the maximum length of the topic alias.
|
/// This gives the maximum length of the topic alias.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ushort? TopicAliasMaximum { get; set; }
|
public ushort TopicAliasMaximum { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the user properties.
|
/// Gets or sets the user properties.
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace MQTTnet.Client
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort? topicAliasMaximum)
|
public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort topicAliasMaximum)
|
||||||
{
|
{
|
||||||
_options.TopicAliasMaximum = topicAliasMaximum;
|
_options.TopicAliasMaximum = topicAliasMaximum;
|
||||||
return this;
|
return this;
|
||||||
@@ -100,13 +100,13 @@ namespace MQTTnet.Client
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MqttClientOptionsBuilder WithRequestProblemInformation(bool? requestProblemInformation = true)
|
public MqttClientOptionsBuilder WithRequestProblemInformation(bool requestProblemInformation = true)
|
||||||
{
|
{
|
||||||
_options.RequestProblemInformation = requestProblemInformation;
|
_options.RequestProblemInformation = requestProblemInformation;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MqttClientOptionsBuilder WithRequestResponseInformation(bool? requestResponseInformation = true)
|
public MqttClientOptionsBuilder WithRequestResponseInformation(bool requestResponseInformation = true)
|
||||||
{
|
{
|
||||||
_options.RequestResponseInformation = requestResponseInformation;
|
_options.RequestResponseInformation = requestResponseInformation;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace MQTTnet.Packets
|
|||||||
|
|
||||||
public byte[] AuthenticationData { get; set; }
|
public byte[] AuthenticationData { get; set; }
|
||||||
|
|
||||||
public bool? RequestProblemInformation { get; set; }
|
public bool RequestProblemInformation { get; set; } = true;
|
||||||
|
|
||||||
public bool? RequestResponseInformation { get; set; }
|
public bool RequestResponseInformation { get; set; }
|
||||||
|
|
||||||
public ushort? ReceiveMaximum { get; set; }
|
public ushort? ReceiveMaximum { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user