in reply to IO::Socket::INET on win32
Which version of Perl? Cos I can't get it to crash on any of the versions I have available.
It doesn't succeed, but that's not the same as "crashing". And if you print out the extended error information you get a clue as to why:
use IO::Socket::INET; my $s = IO::Socket::INET-> new( Listen => 5, LocalPort => 10000, Blocking => 0, ReuseAddr => 1, ) or die "error:$! [$^E]"; print $s; __END__ c:\test>junk error: [Incorrect function] at c:\test\junk.pl line 2.
The reason for the failure is that the Blocking => 0 parameter is nt supported on win32. Is is possible to set sockets non-blocking on win32, but you have to use an ioctl call to do it.
A supersearch for "0x8004667e" turns up a whole bunch of previous discussion and examples.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IO::Socket::INET on win32
by dk (Chaplain) on Dec 13, 2007 at 19:37 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2007 at 23:06 UTC | |
by dk (Chaplain) on Dec 14, 2007 at 00:02 UTC |