2008-09-18 Robert Jordan <robertj@gmx.net>
authorRobert Jordan <robertj@gmx.net>
Thu, 18 Sep 2008 08:32:17 +0000 (08:32 -0000)
committerRobert Jordan <robertj@gmx.net>
Thu, 18 Sep 2008 08:32:17 +0000 (08:32 -0000)
* TcpConnectionPool.cs: Set NoDelay on both profiles.

svn path=/trunk/mcs/; revision=113395

mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs

index 6642508280b817ce87abbe26bd955792e366df04..214ab8b92c4c8f3dc8b423b085d8f537c4f9f3d0 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-18  Robert Jordan  <robertj@gmx.net>
+
+       * TcpConnectionPool.cs: Set NoDelay on both profiles.
+
 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
 
        * TcpConnectionPool.cs: Set the NoDelay flag on the socket to avoid 
index a69981bd05879f04608c0c0876909ade2f80182f..0e7efffeed4beb9025ae97340b06c7a52f2f314f 100644 (file)
@@ -124,9 +124,14 @@ namespace System.Runtime.Remoting.Channels.Tcp
        {\r
                public ReusableTcpClient (string host, int port): base (host, port)\r
                {\r
+                       // Avoid excessive waiting for data by the tcp stack in linux.\r
+                       // We can't safely use SetSocketOption for both runtimes because\r
+                       // it would break 2.0 TcpClient's property cache.\r
 #if NET_2_0\r
-                       // Avoid excessive waiting for data by the tcp stack in linux\r
                        Client.NoDelay = true;\r
+#else\r
+                       Client.SetSocketOption (SocketOptionLevel.Tcp,\r
+                                               SocketOptionName.NoDelay, 1);\r
 #endif\r
                }\r
                \r