Replace the winsocket pair sub with this:
sub winsocketpair { my $proto = getprotobyname('tcp'); my $first = 1; for (1..5) { if ($first) { undef $first; } else { carp "winsocketpair failed: $!, retrying" } socket(my $listener, AF_INET, SOCK_STREAM, $proto) or return (); socket(my $server, AF_INET, SOCK_STREAM, $proto) or return (); socket(my $client, AF_INET, SOCK_STREAM, $proto) or return (); my $true = 1; ioctl($client, 0x8004667e, \$true ); my $addr = sockaddr_in(0, INADDR_LOOPBACK); bind($listener, $addr) or return (); listen($listener, 1) or return (); $addr = getsockname($listener); connect($client, $addr) or $! == 10035 or $! == EINPROGRESS or next; my $peer = accept($server, $listener) or next; my $false = 0; ioctl($client, 0x8004667e, \$false ); if ($peer eq getsockname($client)) { return ($server, $client); } } return (); }
And ignore make test--the tests seem to be broken. They sometime pass and sometimes fail?
In reply to Re^3: Alternative for Select for pipes in Windows?
by BrowserUk
in thread Alternative for Select for pipes in Windows?
by matematiko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |