freeswitch/scripts/multicast/send.pl
Anthony Minessale a2683555d6 update defaults
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2867 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-29 13:00:28 +00:00

18 lines
323 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("00000000$buf\n");