Commit 73438194 authored by justcoding121's avatar justcoding121

nodelay option

parent 90281644
......@@ -271,7 +271,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
{
tcpClient = new TcpClient(upStreamEndPoint)
{
NoDelay = true,
NoDelay = proxyServer.NoDelay,
ReceiveTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
SendTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
SendBufferSize = proxyServer.BufferSize,
......
......@@ -173,6 +173,12 @@ namespace Titanium.Web.Proxy
/// </summary>
public bool EnableTcpServerConnectionPrefetch { get; set; } = true;
/// <summary>
/// Gets or sets a Boolean value that specifies whether server and client stream Sockets are using the Nagle algorithm.
/// Defaults to true, no nagle algorithm is used.
/// </summary>
public bool NoDelay { get; set; } = true;
/// <summary>
/// Buffer size in bytes used throughout this proxy.
/// Default value is 8192 bytes.
......@@ -696,6 +702,7 @@ namespace Titanium.Web.Proxy
{
// based on end point type call appropriate request handlers
tcpClient = endPoint.Listener.EndAcceptTcpClient(asyn);
tcpClient.NoDelay = NoDelay;
}
catch (ObjectDisposedException)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment