mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-31 03:02:39 +08:00
Add comments.
This commit is contained in:
@@ -5,4 +5,5 @@
|
|||||||
* [Server] Fixed reporting of _MaximumQoS_ in _ConnAck_ packet (MQTTv5 only) (#1442).
|
* [Server] Fixed reporting of _MaximumQoS_ in _ConnAck_ packet (MQTTv5 only) (#1442).
|
||||||
* [Server] Fix cross thread issue in session message storage for QoS 1 and 2.
|
* [Server] Fix cross thread issue in session message storage for QoS 1 and 2.
|
||||||
* [Server] The event _ClientSubscribedTopicAsync_ is now fired after the subscription is completely processed internally (#1435).
|
* [Server] The event _ClientSubscribedTopicAsync_ is now fired after the subscription is completely processed internally (#1435).
|
||||||
* [Server] Improved CPU usage on lower end machines (#788).
|
* [Server] Improved CPU usage on lower end machines (#788).
|
||||||
|
* [Client] Added support for passing the local endpoint which should be used (network card).
|
||||||
@@ -98,7 +98,6 @@ namespace MQTTnet.Extensions.WebSocket4Net
|
|||||||
#else
|
#else
|
||||||
certificates.Add(certificate);
|
certificates.Add(certificate);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,8 +264,7 @@ namespace MQTTnet.Client
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Consider creating _MqttClientTcpOptionsBuilder_ as overload.
|
|
||||||
public MqttClientOptionsBuilder WithTcpServer(Action<MqttClientTcpOptions> optionsBuilder)
|
public MqttClientOptionsBuilder WithTcpServer(Action<MqttClientTcpOptions> optionsBuilder)
|
||||||
{
|
{
|
||||||
if (optionsBuilder == null)
|
if (optionsBuilder == null)
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ namespace MQTTnet.Client
|
|||||||
|
|
||||||
public int BufferSize { get; set; } = 8192;
|
public int BufferSize { get; set; } = 8192;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets whether the underlying socket should run in dual mode.
|
||||||
|
/// Leaving this _null_ will avoid setting this value at socket level.
|
||||||
|
/// Setting this a value other than _null_ will throw an exception when only IPv4 is supported on the machine.
|
||||||
|
/// </summary>
|
||||||
public bool? DualMode { get; set; }
|
public bool? DualMode { get; set; }
|
||||||
|
|
||||||
public LingerOption LingerState { get; set; } = new LingerOption(true, 0);
|
public LingerOption LingerState { get; set; } = new LingerOption(true, 0);
|
||||||
|
|||||||
@@ -7,23 +7,23 @@ using System.Net;
|
|||||||
|
|
||||||
namespace MQTTnet.Client
|
namespace MQTTnet.Client
|
||||||
{
|
{
|
||||||
public class MqttClientWebSocketOptions : IMqttClientChannelOptions
|
public sealed class MqttClientWebSocketOptions : IMqttClientChannelOptions
|
||||||
{
|
{
|
||||||
public string Uri { get; set; }
|
public CookieContainer CookieContainer { get; set; }
|
||||||
|
|
||||||
|
public MqttClientWebSocketProxyOptions ProxyOptions { get; set; }
|
||||||
|
|
||||||
public IDictionary<string, string> RequestHeaders { get; set; }
|
public IDictionary<string, string> RequestHeaders { get; set; }
|
||||||
|
|
||||||
public ICollection<string> SubProtocols { get; set; } = new List<string> { "mqtt" };
|
public ICollection<string> SubProtocols { get; set; } = new List<string> { "mqtt" };
|
||||||
|
|
||||||
public CookieContainer CookieContainer { get; set; }
|
|
||||||
|
|
||||||
public MqttClientWebSocketProxyOptions ProxyOptions { get; set; }
|
|
||||||
|
|
||||||
public MqttClientTlsOptions TlsOptions { get; set; } = new MqttClientTlsOptions();
|
public MqttClientTlsOptions TlsOptions { get; set; } = new MqttClientTlsOptions();
|
||||||
|
|
||||||
|
public string Uri { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return Uri;
|
return Uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace MQTTnet.Client
|
namespace MQTTnet.Client
|
||||||
{
|
{
|
||||||
public class MqttClientWebSocketProxyOptions
|
public sealed class MqttClientWebSocketProxyOptions
|
||||||
{
|
{
|
||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ namespace MQTTnet.Implementations
|
|||||||
|
|
||||||
void SetupClientWebSocket(ClientWebSocket clientWebSocket)
|
void SetupClientWebSocket(ClientWebSocket clientWebSocket)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_options.ProxyOptions != null)
|
if (_options.ProxyOptions != null)
|
||||||
{
|
{
|
||||||
clientWebSocket.Options.Proxy = CreateProxy();
|
clientWebSocket.Options.Proxy = CreateProxy();
|
||||||
|
|||||||
Reference in New Issue
Block a user