Re: Squid patch

From: Jordan Mendelson <[email protected]>
Date: Fri, 18 Jul 1997 16:12:47 -0400 (EDT)

> >
> > Strangely enough, Linux documentation says it does have the SO_RCVTIMEO
> > value, but my 2.0.29 kernel doesn't have it listed anywhere.
>
> Hmm... Interesting. Does it fail to compile?

Yep, SO_RCVTIMEO is not defined in any of my headers. Linux by default
puts all these SO_* files in /usr/include/linux/asm/socket.h which is read
when you include /usr/include/sys/socket.h

SO_RCVTIMEO is not in that file nor any other file, so I have to assume
that doesn't work :)

> I think it shouldn't be too hard to fix that, since in the final analysis
> the SO_RCVTIMEO value is mostly just used as a glorified global variable
> to set the socket lifetime in the comm_connect_addr() function in
> [patched] comm.c line 546.

I just commented the entire section out, doesn't seem to hurt anything :)

> What do you think a good alternate approach might be? Maybe a little
> FD_ENTRY variable to hold the connect timeout for that descriptor?

Well, set the socket to non-blocking, then use select() to block until
the timeout value. Either that or use alarm() and set the socket to
blocking.

Jordan

--
Jordan Mendelson     : www.wserv.com/~jordy/
Web Services, Inc.   : www.wserv.com
Received on Fri Jul 18 1997 - 13:15:29 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:48 MST