=pod =head1 NAME SockJS-perl - a SockJS Perl Plack/PSGI implementation =head1 DESCRIPTION =head2 Supported features Work's still in progress. WebSocket (hixie-75, hixie-76/hybi-00, hybi-10, hybi-17 and various tweaks) XHR Polling/Streaming JSONP Polling EventSource HtmlFile IFrame XHR Polling/EvenSource/HtmlFile JSessionID =head2 The Client-Side Part SockJS client is required. You can get it from L. =head2 The Server-Side Part Here is a simple echo server. #!/usr/bin/env perl use strict; use warnings; use Plack::Builder; use SockJS; builder { mount '/echo' => SockJS->new( handler => sub { my ($session) = @_; $session->on( 'data' => sub { my $session = shift; $session->write(@_); } ); }; ); }; =head2 Running browser tests Read the install instructions in C. Start the test server and open a browser at C and run the qunit tests suite. =head2 Running protocol tests Clone L and follow install instructions. Then start the test server setting C environment variable (this is needed for setting smaller C) and then run the tests. # Run all the tests. ./venv/bin/python sockjs-protocol-dev.py # Run all the tests defined in XhrStreaming. ./venv/bin/python sockjs-protocol-dev.py XhrStreaming # Run only XhrStreaming.test_transport test. ./venv/bin/python sockjs-protocol-dev.py XhrStreaming.test_transport =head1 AUTHOR Viacheslav Tykhanovskyi, "vti@cpan.org". =head1 COPYRIGHT AND LICENSE Copyright (C) 2012, Viacheslav Tykhanovskyi This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.