Perl-Sensitive Sunglasses | |
PerlMonks |
Re: how can I timeout a function like "read" when reading from a socketby Crian (Curate) |
on Mar 08, 2004 at 11:26 UTC ( [id://334762]=note: print w/replies, xml ) | Need Help?? |
You could calculate your own timeout time depending on the length of the input after receiving the header like my $timeout = 120 + int($size/1024)*60; or something simular. Perhaps you have to play around with the "120" and "60" to get values fitting with your environment. Other posts pointed out how to set this timeout-time after calculating it.
In Section
Seekers of Perl Wisdom
|
|