renodino has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to set a socket to nonblocking mode:
It always dies (tho the error seems to flip around betweenuse IO::Socket::INET; my $sock = IO::Socket::INET->new( PeerAddr => 'peer', PeerPort => 9876, Proto => 'tcp', Type => SOCK_STREAM, Blocking => 0 ) || die $!; $sock->close();
andBad file descriptor at iosock.pl line 3.
After stepping into IO::Socket::INET, the failure is always on the $sock->blocking() call.IO::Socket::INET: ...propagated at iosock.pl line 3.
I found node Re: Net::SSH::Perl error message, which points to an old activestate bug report that essentially says I'm SOL.
Update:
Once again, I posted too soon. After changing my supersearch terms, I found Re^2: nbtstat.pl fails for non-windows IP, which provides a number of pointers, esp the ioctl(). Hopefully it will work as advertised...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Nonblocking sockets on Win32
by ikegami (Patriarch) on Nov 28, 2005 at 22:38 UTC | |
by renodino (Curate) on Nov 29, 2005 at 00:07 UTC | |
by rob_au (Abbot) on Nov 29, 2005 at 10:29 UTC | |
by renodino (Curate) on Nov 29, 2005 at 16:04 UTC |