On Mon, 20 Mar 2006 11:56:32 -0800
Skunk Worx <[EMAIL PROTECTED]> wrote:

> Rick Jones wrote:
> > 
> > It _would_ be very interesting to see if disabling tcp_abc does 
> > workaround the problem.
> >
> 
> Yes it does, we tried that first. Then we reenabled tcp_abc and 
> increased the toolkit keep_alive. Either method works around the issue 
> from our point of view.
> 

gsoap is fixable. The following has gsoap use cork to avoid sending small 
buffers.
It compiles, but is UNTESTED.


Index: gsoap-linux-2.7/stdsoap2.c
===================================================================
--- gsoap-linux-2.7.orig/stdsoap2.c     2006-02-19 08:19:11.000000000 -0800
+++ gsoap-linux-2.7/stdsoap2.c  2006-03-20 13:37:06.000000000 -0800
@@ -427,6 +427,10 @@
 static int tcp_done = 0;
 #endif
 
+#ifdef TCP_CORK
+static const int tcp_cork_on = 1, tcp_cork_off = 0;
+#endif
+
 
/******************************************************************************/
 #ifndef WITH_NOIO
 #ifndef PALM_1
@@ -674,7 +678,12 @@
   }
   DBGMSG(SENT, s, n);
 #endif
-  return soap->error = soap->fsend(soap, s, n);
+  soap->error = soap->fsend(soap, s, n);
+#ifdef TCP_CORK
+  setsockopt(soap->sendfd, IPPROTO_TCP, TCP_CORK, (char *)&tcp_cork_off, 
sizeof(int));
+  setsockopt(soap->sendfd, IPPROTO_TCP, TCP_CORK, (char *)&tcp_cork_on, 
sizeof(int));
+#endif
+  return soap->error;
 }
 #endif
 
@@ -4507,6 +4516,10 @@
 #endif
 #endif
 #endif
+#ifdef TCP_CORK
+  setsockopt(soap->sendfd, IPPROTO_TCP, TCP_CORK, 
+            (char *)&tcp_cork_on, sizeof(int));
+#endif
   if (soap->mode & SOAP_IO)
   { soap->bufidx = 0;
     soap->buflen = 0;
Index: gsoap-linux-2.7/stdsoap2.cpp
===================================================================
--- gsoap-linux-2.7.orig/stdsoap2.cpp   2006-02-19 08:19:11.000000000 -0800
+++ gsoap-linux-2.7/stdsoap2.cpp        2006-03-20 13:37:08.000000000 -0800
@@ -427,6 +427,10 @@
 static int tcp_done = 0;
 #endif
 
+#ifdef TCP_CORK
+static const int tcp_cork_on = 1, tcp_cork_off = 0;
+#endif
+
 
/******************************************************************************/
 #ifndef WITH_NOIO
 #ifndef PALM_1
@@ -674,7 +678,12 @@
   }
   DBGMSG(SENT, s, n);
 #endif
-  return soap->error = soap->fsend(soap, s, n);
+  soap->error = soap->fsend(soap, s, n);
+#ifdef TCP_CORK
+  setsockopt(soap->sendfd, PPROTO_TCP, TCP_CORK, (char *)&tcp_cork_off, 
sizeof(int));
+  setsockopt(soap->sendfd, PPROTO_TCP, TCP_CORK, (char *)&tcp_cork_on, 
sizeof(int));
+#endif
+  return soap->error;
 }
 #endif
 
@@ -4507,6 +4516,10 @@
 #endif
 #endif
 #endif
+#ifdef TCP_CORK
+  setsockopt(soap->sendfd, IPPROTO_TCP, TCP_CORK, 
+            (char *)&tcp_corkon, sizeof(int));
+#endif
   if (soap->mode & SOAP_IO)
   { soap->bufidx = 0;
     soap->buflen = 0;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to