THRIFT-1055. csharp: csharp TServerSocket and TSocket do not disable Nagle via Socket...
authorBryan Duxbury <bryanduxbury@apache.org>
Tue, 8 Feb 2011 16:38:15 +0000 (16:38 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Tue, 8 Feb 2011 16:38:15 +0000 (16:38 +0000)
This patch sets NoDelay on TSocket and TServerSocket to improve performance.

Patch: Chris Morgan

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1068470 13f79535-47bb-0310-9956-ffa450edef68

lib/csharp/src/Transport/TServerSocket.cs
lib/csharp/src/Transport/TSocket.cs

index 218291a..fd5c662 100644 (file)
@@ -91,6 +91,7 @@ namespace Thrift.Transport
                        {
                                // Make server socket
                                server = new TcpListener(System.Net.IPAddress.Any, this.port);
+                               server.Server.NoDelay = true;
                        }
                        catch (Exception)
                        {
index 4c64a36..feb5503 100644 (file)
@@ -61,6 +61,7 @@ namespace Thrift.Transport
                {
                        client = new TcpClient();
                        client.ReceiveTimeout = client.SendTimeout = timeout;
+                       client.Client.NoDelay = true;
                }
 
                public int Timeout