Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Timing Socket Output

by Ryszard (Priest)
on Jan 27, 2003 at 15:46 UTC ( [id://230247]=note: print w/replies, xml ) Need Help??


in reply to Timing Socket Output

How about:
.. .. $SIG{ALM} = \&timed_out; eval { alarm(5) #socket code here }; if ($@=~/dead/) { #time out handling here } alarm(0); .. .. sub timed_out{ die "dead"; }

From there you can do whatever handling you like (and should prolly change the 5 to something like $timeoutValue)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-23 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found