in reply to Making Timeout for Yourself

I don't understand. Won't $http->request() block until it gets something back or the underlieing socket times out? How can you check the timeout if it blocks?

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Making Timeout for Yourself
by mcogan1966 (Monk) on Dec 31, 2003 at 20:53 UTC
    Darnit, you're right.

    I reversed the conditions, and I seem to have blocked the timer check. Grr. And here I though I had solved the problem.

    Any thoughts on how to get around this?

      Best way is to e-mail the author of HTTP::Lite with a patch that adds a way to set a timeout value (which should be easy) and sets that timeout value on the socket it opens (which should also be easy).

      ----
      I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
      -- Schemer

      : () { :|:& };:

      Note: All code is untested, unless otherwise stated