mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 08:33:01 +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.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
bool? RequestProblemInformation { get; }
|
||||
bool RequestProblemInformation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the request response information.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
bool? RequestResponseInformation { get; }
|
||||
bool RequestResponseInformation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the session expiry interval.
|
||||
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
|
||||
/// Gets the topic alias maximum.
|
||||
/// This gives the maximum length of the topic alias.
|
||||
/// </summary>
|
||||
ushort? TopicAliasMaximum { get; }
|
||||
ushort TopicAliasMaximum { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user properties.
|
||||
|
||||
@@ -79,13 +79,13 @@ namespace MQTTnet.Client
|
||||
/// Gets or sets the request problem information.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
public bool? RequestProblemInformation { get; set; }
|
||||
public bool RequestProblemInformation { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the request response information.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
public bool? RequestResponseInformation { get; set; }
|
||||
public bool RequestResponseInformation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the session expiry interval.
|
||||
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
|
||||
/// Gets or sets the topic alias maximum.
|
||||
/// This gives the maximum length of the topic alias.
|
||||
/// </summary>
|
||||
public ushort? TopicAliasMaximum { get; set; }
|
||||
public ushort TopicAliasMaximum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user properties.
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace MQTTnet.Client
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort? topicAliasMaximum)
|
||||
public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort topicAliasMaximum)
|
||||
{
|
||||
_options.TopicAliasMaximum = topicAliasMaximum;
|
||||
return this;
|
||||
@@ -100,13 +100,13 @@ namespace MQTTnet.Client
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttClientOptionsBuilder WithRequestProblemInformation(bool? requestProblemInformation = true)
|
||||
public MqttClientOptionsBuilder WithRequestProblemInformation(bool requestProblemInformation = true)
|
||||
{
|
||||
_options.RequestProblemInformation = requestProblemInformation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttClientOptionsBuilder WithRequestResponseInformation(bool? requestResponseInformation = true)
|
||||
public MqttClientOptionsBuilder WithRequestResponseInformation(bool requestResponseInformation = true)
|
||||
{
|
||||
_options.RequestResponseInformation = requestResponseInformation;
|
||||
return this;
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace MQTTnet.Packets
|
||||
|
||||
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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user