On Wed, 19 Dec 2001, Hrvoje Niksic wrote: > But one problem with this implementation is portability -- I'm pretty sure > that some systems don't support FIONBIO.
Correct. Ancient ones it seems, I couldn't find a single "modern" (eh, no don't ask me to define that term) system that doesn't do it FIONBIO-style. > In fact, Wget should work even on systems without a select() call. Yikes! :-) > Several days ago I've taken a look at how libcurl handles non-blocking > sockets, and I was appalled at the complexity of the configure checks > required to support a large variety of systems. *nods*. I wrote the test. I tried to research the case before I dove into it, and I believe my test cover most systems. > Implementing the same feature in Wget should probably require more > investigation and a lot of testing on different platforms. Hm. First, would that really be so bad? Secondly, why not "downgrade" to blocking connects if you couldn't figure out how to do non-blocking ones? I think we (can) do that in libcurl. > So far I've been consistently reaching the conclusion that connect timeouts > are simply not worth the effort. You could solve it with a plain and simple alarm() and a signal handler. It would work on pretty much all unix-systems... -- Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77 ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol