Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- IO::Socket::INET nonblocking confusing
April 25, 2007, 11:27 am
rate this thread
I am confused with the IO::Socket module
When I attempt to open a "blocking" udp socket with the following
my $sock = new IO::Socket::INET(
PeerAddr => $addr,
PeerPort => $port,
Proto => 'udp',
Blocking => 1);
$sock or die "no socket :$!, $@\n";
It returns "no socket:......"
If I remove the "Blocking => 1" option, the socket is created
successfully. Anyone knows how to enable the "Blocking" option
Calling the following line afterwards:
$len = $sock->recv( my $reply, 128);
As it is said that the default socket will be a "blocking" one, I
expect it to wait until there is new data. However, it returns
immediately, with an undefined $len.
Is it the normal behavior?
Re: IO::Socket::INET nonblocking confusing
Complete with the ellipsis? If not, what is the actual error message you
What is your OS and version of IO::Socket and IO::Socket::INET?
What is in "$!" after recv returns?
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
- » Is it possible to use a custom perl binary inside a prebuilt apache/mod_perl environment?
- — Previous thread in » PERL Modules Announcements