Add more config values for TCP connections.

This commit is contained in:
Christian Kratky
2019-04-03 23:46:13 +02:00
parent cdeb073bb0
commit b5a1d3a69f
5 changed files with 48 additions and 17 deletions
@@ -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;