mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
Add more config values for TCP connections.
This commit is contained in:
@@ -62,7 +62,7 @@ namespace MQTTnet.Implementations
|
||||
if (_socket == null)
|
||||
{
|
||||
_socket = new StreamSocket();
|
||||
_socket.Control.NoDelay = true;
|
||||
_socket.Control.NoDelay = _options.NoDelay;
|
||||
_socket.Control.KeepAlive = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace MQTTnet.Implementations
|
||||
_listener = new StreamSocketListener();
|
||||
|
||||
// This also affects the client sockets.
|
||||
_listener.Control.NoDelay = true;
|
||||
_listener.Control.NoDelay = options.DefaultEndpointOptions.NoDelay;
|
||||
_listener.Control.KeepAlive = true;
|
||||
_listener.Control.QualityOfService = SocketQualityOfService.LowLatency;
|
||||
_listener.ConnectionReceived += AcceptDefaultEndpointConnectionsAsync;
|
||||
|
||||
Reference in New Issue
Block a user