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
Download (untitled) / with headers
text/plain 709b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.