Subject: | IO-Socket-Multicast v1.04 example client.pl fails on win32 |
Hello,
Using the example client.pl/server.pl scripts provided in the README
file included with the module, I receive the following message running
client.pl.
"Couldn't set group: Unknown error" generated from line 11.
I have tried changing line 11 to the following:
$sock->mcast_add(GROUP, '192.168.1.100') || die "Couldn't set group:
$!\n"; # 192.168.1.100 is on of the local ip addresses of machine (has
multiple interfaces)
with the same results.
01. #!/usr/bin/perl
02. # client
03.
04. use strict;
05. use IO::Socket::Multicast;
06.
07. use constant GROUP => '226.1.1.2';
08. use constant PORT => '2000';
09.
10. my $sock = IO::Socket::Multicast->new(Proto=>'udp',LocalPort=>PORT);
11. $sock->mcast_add(GROUP) || die "Couldn't set group: $!\n";
12. while (1) {
13. my $data;
14. next unless $sock->recv($data,1024);
15. print $data;
16. }
perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 25 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Binary build 817 [257965] provided by ActiveState http://www.ActiveState.com
Built Mar 20 2006 17:54:25
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Win2k Advanced Server SP4