POE::Wheel::Multicast - POE Wheel for multicast handling.
use POE; use POE::Wheel::Multicast; POE::Session->create( inline_states => { _start => sub { my $wheel = $_[HEAP]->{wheel} = POE::Wheel::Multicast->new( LocalAddr => '10.0.0.1', LocalPort => 1234, PeerAddr => '10.0.0.2', PeerPort => 1235, InputEvent => 'input', ); $wheel->put( { payload => 'This datagram will go to the default address.', }, { payload => 'This datagram will go to the explicit address and port I have paired with it.', addr => '10.0.0.3', port => 1236, }, ); }, input => sub { my ($wheel_id, $input) = @_[ARG0, ARG1]; print "Incoming datagram from $input->{addr}:$input->{port}: '$input->{payload}'\n"; }, } ); POE::Kernel->run;
POE Wheel for multicast handling. This is a subclass of POE::Wheel::UDP
Contains a hashref with the following keys:
Specifies the address and port from which we received this datagram.
The actual contents of the datagram.
The wheel id for the wheel that fired this event.
CFEDDE would like to see filter support in the UDP wheel... I would love to have a piece of pie. Let's see who gets what they want first.
IPV6 support.
TTL changing support.
POE
Jonathan Steinert <hachi@cpan.org>
Copyright (C) 2006 by Jonathan Steinert... or Six Apart... I don't know who owns me when I'm at home. Oh well.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install POE::Wheel::Multicast, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Wheel::Multicast
CPAN shell
perl -MCPAN -e shell install POE::Wheel::Multicast
For more information on module installation, please visit the detailed CPAN module installation guide.