| 1 | # You may distribute under the terms of either the GNU General Public License | ||
| 2 | # or the Artistic License (the same terms as Perl itself) | ||
| 3 | # | ||
| 4 | # (C) Paul Evans, 2017 -- leonerd@leonerd.org.uk | ||
| 5 | |||
| 6 | package Net::Async::WebSocket::JSON; | ||
| 7 | |||
| 8 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 1 | our $VERSION = '0.01'; | |
| 12 | |||
| 13 | =head1 NAME | ||
| 14 | |||
| 15 | C<Net::Async::WebSocket::JSON> - use JSON-encoded data over WebSockets with C<IO::Async> | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | This distribution provides subclasses of modules from L<Net::Async::WebSocket> | ||
| 20 | that add convenient wrappers for encoding or decoding JSON data in text frames | ||
| 21 | over websockets. | ||
| 22 | |||
| 23 | To implement a server, use L<Net::Async::WebSocket::JSON::Server> as if it was | ||
| 24 | L<Net::Async::WebSocket::Server>. | ||
| 25 | |||
| 26 | To implement a client, use L<Net::Async::WebSocket::JSON::Client> as if it was | ||
| 27 | L<Net::Async::WebSocket::Client>. | ||
| 28 | |||
| 29 | In either cases, connected client instances will be instances of | ||
| 30 | L<Net::Async::WebSocket::JSON::Protocol>, and have the new C<send_json> method | ||
| 31 | and C<on_json> event available. | ||
| 32 | |||
| 33 | This module itself does not provide any code, and exists only to provide the | ||
| 34 | module C<$VERSION> and top-level documentation. | ||
| 35 | |||
| 36 | =cut | ||
| 37 | |||
| 38 | =head1 SEE ALSO | ||
| 39 | |||
| 40 | =over 8 | ||
| 41 | |||
| 42 | =item * | ||
| 43 | |||
| 44 | L<Protocol::WebSocket> - WebSocket protocol | ||
| 45 | |||
| 46 | =back | ||
| 47 | |||
| 48 | =head1 AUTHOR | ||
| 49 | |||
| 50 | Paul Evans <leonerd@leonerd.org.uk> | ||
| 51 | |||
| 52 | =cut | ||
| 53 | |||
| 54 | 1 | 0x55AA; | |