# New Ticket Created by Chris Drake # Please include the string: [perl #33619] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=33619 > IO::Socket::INET.pm module cannot do nonblocking connects. ActiveState fixed the Win32 version a year or so ago. Here's the test script and comments:- http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/2030994 Here's a corresponding Unix fix (Tested OK on RedHat EL3.0):- *** /usr/lib/perl5/5.8.0/IO/Socket/INET.pm.ori 2004-06-28 18:40:57.000000000 +0000 --- INET.pm 2004-12-30 16:33:23.000000000 +0000 *************** *** 193,196 **** --- 193,208 ---- # my $before = time() if $timeout; + + # these 8 lines contributed by Chris Drake:- + if(defined $arg->{Blocking}) { + if($arg->{Blocking}) { + $sock->blocking($arg->{Blocking}) + } else { + $sock->blocking(undef); + my $temp = 1; ioctl($sock, 0x8004667E, \$temp); # Don't let it block us. + } + } + + undef $@; if ($sock->connect(pack_sockaddr_in($rport, $raddr))) { Kind Regards, Chris DrakeThread Previous | Thread Next