NAME

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

SYNOPSIS

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.

METHODS

$c->websocket(\&callback);