Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Timeouting a socket scriptby Thelonius (Priest) |
on Dec 30, 2005 at 21:06 UTC ( [id://520065]=note: print w/replies, xml ) | Need Help?? |
Your question is a bit vague. Saying "it stops responding" could mean several things. Perhaps zentara's links will solve your problem.
I've written an example TCP server which will kill a process after $timeout seconds or if the client closes the connection. You can test it with a web browser, e.g., connecting to http://yourserverhere:5050/ and then clicking the Stop loading button. If neither my nor zentara's answer helps you, post your actual code and a more precise description of what happens. (By the way, the correct English is "timing out", not "timeouting".)
In Section
Seekers of Perl Wisdom
|
|