Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Feb 2000 09:50:09 -0600 (CST)
From:      Guy Helmer <ghelmer@cs.iastate.edu>
To:        Sebastiaan van Erk <sebster@sebster.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: TCP_NODELAY
Message-ID:  <Pine.HPX.4.05.10002020946030.18712-100000@popeye.cs.iastate.edu>
In-Reply-To: <20000202145409.225685DC3@eeyore.sebster.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Feb 2000, Sebastiaan van Erk wrote:

> Hi there,
>  
> I tried the following code to disable Nagle's algorithm, but it doesn't 
> seem to work: 
>  
>    int d = 1;
>    setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *)&d, sizeof(d));
> 
> ...
> 
> My OS is FreeBSD 3.4 STABLE. If I compile the program under Linux,
> Solaris, or HP-UX, it works fine.
> 
> I attached both the C program and the Java program which I use to test
> the TCP_NODELAY settings.

FreeBSD does not propagate the TCP_NODELAY flag from a listening socket to
the accepted sockets.  Your code needs to perform a setsockopt on the
accepted socket (sendskt in your tcpdelay.c file) for the Nagle algorithm
to be disabled.  (The FreeBSD mail list archives contain a thread on this
very topic if you want to explore previous questions and responses.)

Guy

Guy Helmer, Ph.D. Candidate, Iowa State University Dept. of Computer Science 
Research Assistant, Dept. of Computer Science   ---   ghelmer@cs.iastate.edu
http://www.cs.iastate.edu/~ghelmer



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.05.10002020946030.18712-100000>