You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Igor Tatarinov <ta...@prairie.NoDak.edu> on 1998/01/06 04:40:12 UTC
setsockopt in child_main
Correct me if I am wrong but currently socket options (KEEPALIVE and
SND_BUF, SO_LINGER) are only set for the listening sockets (in make_sock).
If all these options were inherited on accept, everything would be fine but
TCP_NODELAY seems to be an exception (disable_ nagle is also called in
child_main). So it is not inherited? (I checked it isn't; throughput
degarades significantly without it).
I suspect all others are not inherited either so they have to be set again
(actually the listening sockets do not probably require a large buffer). I
may be wrong though.
any ideas?
thanks,
igor
Re: setsockopt in child_main
Posted by Marc Slemko <ma...@worldgate.com>.
On Mon, 5 Jan 1998, Marc Slemko wrote:
> SO_DEBUG, SO_DONTROUTE, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF
> and SO_SNDBUF are inherited; if not, your system is broken.
Oh, cf. R. Stevens "Unix Network Programming", volume one, second edition,
page... erm.... 183 for details.
>
> Some of them have to be, since after the connection is established it can
> be too late to set them; eg. buffer sizes are related to the window scale
> option which is negotiated before accept() returns.
>
> On Mon, 5 Jan 1998, Igor Tatarinov wrote:
>
> > Correct me if I am wrong but currently socket options (KEEPALIVE and
> > SND_BUF, SO_LINGER) are only set for the listening sockets (in make_sock).
> >
> > If all these options were inherited on accept, everything would be fine but
> > TCP_NODELAY seems to be an exception (disable_ nagle is also called in
> > child_main). So it is not inherited? (I checked it isn't; throughput
> > degarades significantly without it).
> >
> > I suspect all others are not inherited either so they have to be set again
> > (actually the listening sockets do not probably require a large buffer). I
> > may be wrong though.
> >
> > any ideas?
> >
> > thanks,
> > igor
> >
>
Re: setsockopt in child_main
Posted by Marc Slemko <ma...@worldgate.com>.
SO_DEBUG, SO_DONTROUTE, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF
and SO_SNDBUF are inherited; if not, your system is broken.
Some of them have to be, since after the connection is established it can
be too late to set them; eg. buffer sizes are related to the window scale
option which is negotiated before accept() returns.
On Mon, 5 Jan 1998, Igor Tatarinov wrote:
> Correct me if I am wrong but currently socket options (KEEPALIVE and
> SND_BUF, SO_LINGER) are only set for the listening sockets (in make_sock).
>
> If all these options were inherited on accept, everything would be fine but
> TCP_NODELAY seems to be an exception (disable_ nagle is also called in
> child_main). So it is not inherited? (I checked it isn't; throughput
> degarades significantly without it).
>
> I suspect all others are not inherited either so they have to be set again
> (actually the listening sockets do not probably require a large buffer). I
> may be wrong though.
>
> any ideas?
>
> thanks,
> igor
>