Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: reading from multicast socket

by Chief of Chaos (Friar)
on Nov 12, 2002 at 10:58 UTC ( [id://212242]=note: print w/replies, xml ) Need Help??


in reply to reading from multicast socket

Hi Monky,
it is possible to use the 'IO::Socket::Multicast'-module.
This may be a little bit easier.

e.g.:
#!/usr/bin/perl # client use strict; use IO::Socket::Multicast; use constant GROUP => '227.50.49.48'; use constant PORT => '9897'; my $sock = IO::Socket::INET->new(Proto=>'udp',LocalPort=>PORT); $sock->mcast_add(GROUP) || die "Couldn't set group: $!\n"; while (1) { my $data; next unless $sock->recv($data,1024); print $data; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://212242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-24 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found