freeswitch/scripts/perl/multicast/send.pl
Anthony Minessale 7095887bad update
2010-04-07 01:44:56 -05:00

18 lines
315 B
Perl
Executable File

#!/usr/local/bin/perl
use IO::Socket::INET;
my ($ip, $port, $file) = @ARGV;
$ip and $port or die "Usage $0: <ip> <port>\n";
$socket = new IO::Socket::INET->new( PeerPort => $port,
Proto => 'udp',
PeerAddr => $ip);
open(I, $file);
$/ = undef;
my $buf = <I>;
close(I);
$socket->send("$buf\n");