Skip Menu |
 

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 43973
Status: resolved
Priority: 0/
Queue: IO

People
Owner: Nobody in particular
Requestors: mpapet [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.2301
Fixed in: (no value)



Subject: Listen option Doesn't work in Win32, QUEUE does??
Download (untitled) / with headers
text/plain 543b
The listen option dies as illustrated below. my $listensock = IO::Socket::INET->new ( LocalHost => "localhost", LocalPort => "1434", Proto => "udp", Type => SOCK_DGRAM, Listen => 1, ReuseAddr => 1, ) or die " There's a problem with this server $! \n"; The error returned is "Unknown error" . Replacing "listen" with "QUEUE" does not error out. Are they the same thing? The error is reproducable on strawberry perl. www.strawberryperl.com perl -v returns "This is perl, v5.10.0 built for MSWin32-x86-multi-thread"
Subject: Re: [rt.cpan.org #43973] Listen option Doesn't work in Win32, QUEUE does??
Date: Mon, 9 Mar 2009 14:16:43 -0500
To: bug-IO [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 709b
On Mar 9, 2009, at 2:00 PM, mpapet@yahoo.com via RT wrote: Show quoted text
> The listen option dies as illustrated below. > my $listensock = IO::Socket::INET->new ( > LocalHost => "localhost", > LocalPort => "1434", > Proto => "udp", > Type => SOCK_DGRAM, > Listen => 1, > ReuseAddr => 1, > ) or die " There's a problem with this server $! \n"; > > The error returned is "Unknown error" . Replacing "listen" with > "QUEUE" > does not error out. Are they the same thing?
IO::Socket::INET does not have an option called QUEUE, it is called Listen. Passing QUEUE will just attempt to connect as a client to whatever is already listening on localhost:1434, which I am sure you do not want. Graham.
Subject: Listen option Doesn't work in win 2003 server
From: mpapet [...] yahoo.com
Download (untitled) / with headers
text/plain 1.3k
On Mon Mar 09 15:18:30 2009, gbarr@pobox.com wrote: Show quoted text
> On Mar 9, 2009, at 2:00 PM, mpapet@yahoo.com via RT wrote:
> > The listen option dies as illustrated below. > > my $listensock = IO::Socket::INET->new ( > > LocalHost => "localhost", > > LocalPort => "1434", > > Proto => "udp", > > Type => SOCK_DGRAM, > > Listen => 1, > > ReuseAddr => 1, > > ) or die " There's a problem with this server $! \n";
O.K. Here's the output of netstat -an -p udp Active Connections Proto Local Address Foreign Address State UDP 0.0.0.0:161 *:* UDP 0.0.0.0:445 *:* UDP 0.0.0.0:500 *:* UDP 0.0.0.0:4500 *:* UDP 127.0.0.1:123 *:* UDP 172.31.143.48:123 *:* UDP 172.31.143.48:137 *:* UDP 172.31.143.48:138 *:* UDP 172.31.143.71:123 *:* UDP 172.31.143.72:123 *:* UDP 172.31.143.73:123 *:* UDP 172.31.143.74:123 *:* UDP 172.31.143.75:123 *:* UDP 172.31.143.76:123 *:* UDP 172.31.143.77:123 *:* UDP 172.31.143.78:123 *:* UDP 172.31.143.79:123 *:* UDP 172.31.143.80:123 *:* UDP 172.31.143.81:123 *:* UDP 172.31.143.82:123 *:* No UDP port 1434 listed. Running the script above, as is returns an error.
Subject: Re: [rt.cpan.org #43973] Listen option Doesn't work in win 2003 server
Date: Tue, 10 Mar 2009 14:27:57 -0500
To: bug-IO [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 853b
On Mar 10, 2009, at 1:18 PM, mpapet@yahoo.com via RT wrote: Show quoted text
> Queue: IO > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43973 > > > On Mon Mar 09 15:18:30 2009, gbarr@pobox.com wrote:
>> On Mar 9, 2009, at 2:00 PM, mpapet@yahoo.com via RT wrote:
>>> The listen option dies as illustrated below. >>> my $listensock = IO::Socket::INET->new ( >>> LocalHost => "localhost", >>> LocalPort => "1434", >>> Proto => "udp", >>> Type => SOCK_DGRAM, >>> Listen => 1, >>> ReuseAddr => 1, >>> ) or die " There's a problem with this server $! \n";
> O.K. Here's the output of netstat -an -p udp
Doh, I did not see the udp there before. Listen and accept are for tcp connections. With tcp you have to listen for incomming connections. But with udp you do not connect. You jsut create the socket and use recv/send Graham.


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.