menth0l has asked for the wisdom of the Perl Monks concerning the following question:
In above example i would like to wait max 3 seconds for a message and then close this connection. I found that these solutions don't work:my $sock = new IO::Socket::INET( LocalHost => $address, LocalPort => 0, Proto => 'tcp', Listen => 10, Reuse => 1, ); my $s = $sock->accept; # how to timeout this? my $message = <$s>;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Locked threads and tcp timeouts
by BrowserUk (Patriarch) on Feb 16, 2012 at 12:57 UTC | |
by menth0l (Monk) on Feb 16, 2012 at 13:19 UTC | |
| |
Re: Locked threads and tcp timeouts
by zentara (Cardinal) on Feb 16, 2012 at 17:02 UTC | |
by BrowserUk (Patriarch) on Feb 16, 2012 at 17:05 UTC | |
by nikosv (Deacon) on Feb 19, 2012 at 15:42 UTC | |
by BrowserUk (Patriarch) on Feb 20, 2012 at 02:50 UTC | |
Re: Locked threads and tcp timeouts
by Khen1950fx (Canon) on Feb 19, 2012 at 22:18 UTC |