MATSUNO★Tokuhiro > Amon2-3.66 > Amon2::Plugin::Web::WebSocket

Download:
Amon2-3.66.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source   Latest Release: Amon2-6.02

NAME ^

Amon2::Plugin::Web::WebSocket - [EXPERIMENTAL]websocket plugin for Amon2

SYNOPSIS ^

    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);
            });
        });
    };

DESCRIPTION ^

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.

METHODS ^

$c->websocket(\&callback);

SEE ALSO ^

Twiggy, AnyEvent

syntax highlighting: