Dancer2-Plugin-WebSocket
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
// then later...
mySocket.sendJSON({ whoa: "auto-serialization ftw!" });
```
- mount\_path
Path for the websocket mountpoint. Defaults to `/ws`.
# PLUGIN KEYWORDS
In the various callbacks, the connection object `$conn`
is a [Plack::App::WebSocket::Connection](https://metacpan.org/pod/Plack::App::WebSocket::Connection) object
augmented with the [Dancer2::Plugin::WebSocket::Connection](https://metacpan.org/pod/Dancer2::Plugin::WebSocket::Connection) role.
## websocket\_on\_open sub { ... }
```perl
websocket_on_open sub {
my( $conn, $env ) = @_;
...;
};
lib/Dancer2/Plugin/WebSocket.pm view on Meta::CPAN
mySocket.sendJSON({ whoa: "auto-serialization ftw!" });
=item mount_path
Path for the websocket mountpoint. Defaults to C</ws>.
=back
=head1 PLUGIN KEYWORDS
In the various callbacks, the connection object C<$conn>
is a L<Plack::App::WebSocket::Connection> object
augmented with the L<Dancer2::Plugin::WebSocket::Connection> role.
=head2 websocket_on_open sub { ... }
websocket_on_open sub {
my( $conn, $env ) = @_;
...;
};
( run in 0.227 second using v1.01-cache-2.11-cpan-ec4f86ec37b )