|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
Re^4: How to make an HTTP request with an equivalent of curl's --max-time?by blindluke (Hermit) |
| on Jan 14, 2015 at 09:16 UTC ( [id://1113212]=note: print w/replies, xml ) | Need Help?? |
|
No, not for the self-explanatory option It would be self-explanatory if its name was max-seconds, that's the problem with most of the _time / -time variables and options. Very few things these days are self explanatory, and, due to insufficient information provided, one often has to figure out the units, the limits, or even the object of a question. ;) for the magic url that is immune to regular HTTP GET, that it needs a client induced timeout The OP (probably) refers to the Twitter streaming API - here is the documentation you were (probably) asking for. There are multiple requirements forced upon the client of the stream, like this one below (quote from the docs): Set a timer, either a 90 second TCP level socket timeout, or a 90 second application level timer on the receipt of new data. If 90 seconds pass with no data received, including newlines, disconnect and reconnect immediately according to the backoff strategies in the next section. The Streaming API will send a keep-alive newline every 30 seconds to prevent your application from timing out the connection. You should wait at least 3 cycles to prevent spurious reconnects in the event of network congestion, local CPU starvation, local GC pauses, etc. - Luke
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||