in reply to Re: short (<1sec) timeout on IO::Socket
in thread short (<1sec) timeout on IO::Socket

IO::Socket uses IO::Select? You may want to re-evaluate this. Socket was never based on selector. If one is from c background, will right the way find this false.

Update: saintmike was right and I was wrong. Perl's IO::Socket does require IO::Select at two places: accept and connect.

I tried this code and it returned after 1 second as expected:

use IO::Socket; use strict; use warnings; print time(), "\n"; my $socket = IO::Socket::INET->new(Proto => "tcp", LocalAddr => "local +host", LocalPort => 3000, Listen => 10, Timeout => 0.1); for (1 .. 10) { my $connection = $socket->accept(); } print time(), "\n";