Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: Timeout for connect in Anyevent::HTTP. Help, please.

by Tanktalus (Canon)
on Sep 19, 2012 at 17:48 UTC ( #994490=note: print w/ replies, xml ) Need Help??


in reply to Timeout for connect in Anyevent::HTTP. Help, please.

Just a brief look at AnyEvent::HTTP's fine documentation indicates a timeout key. This timeout value is used (and reset) at various stages of the connection, but may suffice for you.

If not that, then you may need to get a bunch more complex, creating your own timer for on_prepare, keeping the guard object for the overall http_request, and destroying the guard if the timeout happens. I'm not going to provide an example of that only because it's probably more complex than required, so it'd be a waste of time to create it.


Comment on Re: Timeout for connect in Anyevent::HTTP. Help, please.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (16)
As of 2013-06-19 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many continents have you visited?









    Results (642 votes), past polls