At 10:58 AM 02/06/02 -0800, Gisle Aas wrote:
>The timeout setting is used for two things in http requests:
>
> 1) It is passed in as Timeout argument to IO::Socket::INET's
> constructor. IO::Socket::INET currently only use this to
> fail the connect(2) call if it takes too long. The DNS
> lookup of the hostname is done by IO::Socket::INET before
> it even considers the timeout.
Ok, so it really makes sense to wrap the call in an eval block to catch
DNS, if I want the timeout to apply for the entire request (including the
DNS lookup).
I assume the timeout passed to IO::Socket::INET is passed on as a timeout
on the select() system call, which I also assume is portable for Windows.
So, am I safe using a $ua->timeout, AND wrapping the request in eval {}
with an alarm($timeout) call (which I will do only if not running $^O =~
/Win32/)?
That all seem sane?
Thanks very much,
--
Bill Moseley
mailto:[EMAIL PROTECTED]