Padre::Swarm::Transport::Multicast
my $transport = Padre::Swarm::Transport::Multicast->new(); $transport->subscribe_channel( 20000 ) or die $!; $transport->subscribe_channel( 22000 ) or die $!; $transport->start; if ( $transport->started ) { $transport->tell_channel( 22000, 'Hello World!' ); } foreach my $channel ( $transport->poll ) { my $payload = $transport->receive_from( $channel ); # do something exciting w/ $payload }; $transport->unsubscribe_channel( 20000 ); $transport->shutdown;
To install Padre::Plugin::Swarm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre::Plugin::Swarm
CPAN shell
perl -MCPAN -e shell install Padre::Plugin::Swarm
For more information on module installation, please visit the detailed CPAN module installation guide.