forked from Mirrors/freeswitch
ebfc333dc6
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@617 d0543943-73ff-0310-b7d9-9358b9ac24b2
13 lines
310 B
Perl
13 lines
310 B
Perl
use IO::Socket::Multicast;
|
|
my ($ip,$port) = @ARGV;
|
|
|
|
$ip and $port or die "Usage $0: <ip> <port>\n";
|
|
|
|
# create a new UDP socket and add a multicast group
|
|
my $socket = IO::Socket::Multicast->new( LocalPort => $port, ReuseAddr => 1 );
|
|
$socket->mcast_add($ip);
|
|
|
|
while($socket->recv($data,1024)) {
|
|
print $data;
|
|
}
|