[omniORB] Latencies - Oneway vs. Roundtrip

Helge Penne Helge.Penne@datarespons.no
Tue, 13 Apr 1999 17:48:31 +0200


"Jens B. Jorgensen" wrote:

> Helge Penne wrote:
>
> > Woha!  I started using CORBA to get away from all this low-level stuff.  This is a bit
> > beside my field of competence...
> >
> > I've now traced the control flow from the proxy object and all the way down to the NT
> > WinSock "send" function.  So far, it does not seems that omniORB does any buffering of
> > oneway calls.  That should indicate that the buffering is done by the Windows NT socket
> > implementation.
> >
> > The problem would thus seem to be the WinNT sockets use buffering by default.  My guess
> > would be that the problem could be fixed by changing the socket options to
> > "TCP_NODELAY", and that this modification could probably be done by adding the
> > following statements to tcpSocketMTfactory.cc, line 834 (just after the "if (sock =
> > socket(...)...)" block):
> >
> >     BOOL bNoDelay = TRUE;
> >     int nResult = setsockopt( sock,  IPPROTO_TCP1, TCP_NODELAY, &bNoDelay, sizeof(
> > bNoDelay) );
> >     // Code to check the return value should be added...
>
> Close, but you misread the documentation. The '1' following IPPROTO_TCP is a footnote
> indicator which states that IPPROTO_TCP is for backwards compatibility with WinSock 1.1.
> You should use SOL_SOCKET. Also, the optval parameter is supposed to be a pointer to an
> integer (set to 1 in this case), not a BOOL.

I was wondering why they had used a different font for the "1"....  ;-)

However, my version of the documentation (Visual C++ 5.0) does not list TCP_NODELAY under the
SOL_SOCKET heading, only under IPPROTO_TCP.  The way I read this the second parameter should
be IPPROTO_TCP.  Curiously, the documentation states that IPPROTO_TCP has been kept to
preserve backward compatibility with winsock 1.1, but does not mention if it has been
replaced with something else(!).
It also explicitly states that the optval (fourth parameter) should be const char* pointing
to a BOOL value.

Is your documentation different from mine, or am I getting tired and should go home to rest?
;-)

- Helge