udp_proxy - Perl binding for udpxy
use udp_proxy; my $uph = new udp_proxy({ interface => 'eth0', log => 'udp_proxy.log', # or \*LOG, or $fh, or *LOG handle => 'stream.ts', # like log, but default to stdout if not set. }); $uph->do_relay('rtp', '233.33.210.86', 5050);
This module binds some udpxy functional to perl. It is possible to record or transfer unscrambled multicast traffic.
Method new creates object udp_proxy with some parameters: - interface - interface on which object should receive multicast traffic - log - filehandle or filename of log file. - handle - filehandle or filename for writing MPEG-TS packets.
Method that actualy do the work. Writing data to STDOUT or speciefied handle. $command - possible values 'rtp' or 'udp' $host - multicast host to which object should join $port - port on which transmission is going.
None by default.
use udp_proxy; my $app = sub { my $env = shift; return sub { my $respond = shift; my $writer = $respond->([200, ['Content-Type', 'application/octet-stream']]); my $uph = new udp_proxy({ interface => 'en0', log => $env->{'psgi.errors'}, handle => $env->{'psgix.io'}, }); $uph->do_relay('rtp', '233.33.210.86', 5050); $writer->close(); }; };
IO::Socket::Multicast
Pavel V. Cherenkov, <pcherenkov@gmail.com>
Copyright (C) 2008-2013 by Pavel V. Cherenkov
This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
To install udp_proxy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm udp_proxy
CPAN shell
perl -MCPAN -e shell install udp_proxy
For more information on module installation, please visit the detailed CPAN module installation guide.