Dancer2-Plugin-WebSocket

 view release on metacpan or  search on metacpan

README.mkdn  view on Meta::CPAN


[Plack::App::WebSocket](https://metacpan.org/pod/Plack::App::WebSocket), and thus this plugin, requires a plack server that
supports the psgi _streaming_, _nonblocking_ and _io_. [Twiggy](https://metacpan.org/pod/Twiggy)
is the most popular server fitting the bill.

# CONFIGURATION

- serializer

    If serializer is set to a `true` value, messages will be assumed to be JSON
    objects and will be automatically encoded/decoded using a [JSON::MaybeXS](https://metacpan.org/pod/JSON::MaybeXS)
    serializer.  If the value of `serializer` is a hash, it'll be passed as
    arguments to the [JSON::MaybeXS](https://metacpan.org/pod/JSON::MaybeXS) constructor.

    ```
    plugins:
        WebSocket:
            serializer:
                utf8:         1
                allow_nonref: 1
    ```

lib/Dancer2/Plugin/WebSocket.pm  view on Meta::CPAN

supports the psgi I<streaming>, I<nonblocking> and I<io>. L<Twiggy>
is the most popular server fitting the bill.

=head1 CONFIGURATION

=over

=item serializer

If serializer is set to a C<true> value, messages will be assumed to be JSON
objects and will be automatically encoded/decoded using a L<JSON::MaybeXS>
serializer.  If the value of C<serializer> is a hash, it'll be passed as
arguments to the L<JSON::MaybeXS> constructor.

    plugins:
        WebSocket:
            serializer:
                utf8:         1
                allow_nonref: 1

By the way, if you want the connection to automatically serialize data



( run in 0.370 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )