Amon2::Plugin::Web::WebSocket - [EXPERIMENTAL]websocket plugin for Amon2
use Amon2::Lite; any '/echo' => sub { my ($c) = @_; return $c->websocket(sub { my $ws = shift; $ws->on_receive_message(sub { my ($c, $message) = @_; $ws->send_message("YAY: " . $message); }); }); };
This plugin provides websocket feature for Amon2.
You can use websocket very easily with Amon2.
This plugin depended on AnyEvent. You can use this module on Twiggy only.
Twiggy, AnyEvent
To install Amon2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amon2
CPAN shell
perl -MCPAN -e shell install Amon2
For more information on module installation, please visit the detailed CPAN module installation guide.