commit | 2d9dfdb88e58ab5b961726a5506a4f3e0653b807 | [log] [tgz] |
---|---|---|
author | Bryan Duxbury <bryanduxbury@apache.org> | Tue Feb 08 16:38:15 2011 +0000 |
committer | Bryan Duxbury <bryanduxbury@apache.org> | Tue Feb 08 16:38:15 2011 +0000 |
tree | 5074c8da9da723616f34af1262d0858d16252778 | |
parent | 56c2d5682e1122917465e704a43e5c3ae2f6eb99 [diff] |
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 git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1068470 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/csharp/src/Transport/TServerSocket.cs b/lib/csharp/src/Transport/TServerSocket.cs index 218291a..fd5c662 100644 --- a/lib/csharp/src/Transport/TServerSocket.cs +++ b/lib/csharp/src/Transport/TServerSocket.cs
@@ -91,6 +91,7 @@ { // Make server socket server = new TcpListener(System.Net.IPAddress.Any, this.port); + server.Server.NoDelay = true; } catch (Exception) {
diff --git a/lib/csharp/src/Transport/TSocket.cs b/lib/csharp/src/Transport/TSocket.cs index 4c64a36..feb5503 100644 --- a/lib/csharp/src/Transport/TSocket.cs +++ b/lib/csharp/src/Transport/TSocket.cs
@@ -61,6 +61,7 @@ { client = new TcpClient(); client.ReceiveTimeout = client.SendTimeout = timeout; + client.Client.NoDelay = true; } public int Timeout