Skip Menu |

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 20920
Status: resolved
Priority: 0/
Queue: IO

People
Owner: Nobody in particular
Requestors: corion [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.2301
Fixed in: (no value)



Subject: Make IO::Socket::INET non-blocking work on Win32
On Win32, there is a special IOCTL necessary as used by Perlbal or in [1]. It would be nice if IO::Socket::INET did this directly. The following code is blatantly ripped out of the Perlbal distribution: if ($^O eq 'MSWin32') { # On Windows, we have to do this a bit differently. # IO::Socket should really do this for us, but whatever. my $do = 1; ioctl($sock, 0x8004667E, \$do) or die "Unable to make listener on $hostport non-blocking: $^E"; } else { # Handle non-Win32 case } I haven't checked that code on cygwin, so I don't know if cygwin emulates that part already or if it's necessary there as well. Hope that helps, -max [1] http://perlmonks.org/index-log.pl?node_id=529837