You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2011/02/08 17:38:16 UTC
svn commit: r1068470 - in /thrift/trunk/lib/csharp/src/Transport:
TServerSocket.cs TSocket.cs
Author: bryanduxbury
Date: Tue Feb 8 16:38:15 2011
New Revision: 1068470
URL: http://svn.apache.org/viewvc?rev=1068470&view=rev
Log:
THRIFT-1055. csharp: csharp TServerSocket and TSocket do not disable Nagle via Socket.NoDelay = true like cpp and java do
This patch sets NoDelay on TSocket and TServerSocket to improve performance.
Patch: Chris Morgan
Modified:
thrift/trunk/lib/csharp/src/Transport/TServerSocket.cs
thrift/trunk/lib/csharp/src/Transport/TSocket.cs
Modified: thrift/trunk/lib/csharp/src/Transport/TServerSocket.cs
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/csharp/src/Transport/TServerSocket.cs?rev=1068470&r1=1068469&r2=1068470&view=diff
==============================================================================
--- thrift/trunk/lib/csharp/src/Transport/TServerSocket.cs (original)
+++ thrift/trunk/lib/csharp/src/Transport/TServerSocket.cs Tue Feb 8 16:38:15 2011
@@ -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)
{
Modified: thrift/trunk/lib/csharp/src/Transport/TSocket.cs
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/csharp/src/Transport/TSocket.cs?rev=1068470&r1=1068469&r2=1068470&view=diff
==============================================================================
--- thrift/trunk/lib/csharp/src/Transport/TSocket.cs (original)
+++ thrift/trunk/lib/csharp/src/Transport/TSocket.cs Tue Feb 8 16:38:15 2011
@@ -61,6 +61,7 @@ namespace Thrift.Transport
{
client = new TcpClient();
client.ReceiveTimeout = client.SendTimeout = timeout;
+ client.Client.NoDelay = true;
}
public int Timeout