Group
Extension

Matches 5

SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS.pm ( view source; MetaCPAN )
gs;

our $VERSION = '0.10';

use overload '&{}' => sub { shift->to_app(@_) }, fallback => 1;

use JSON         ();
use Digest::MD5  ();
use Scalar::Util ();

use Plack::Middleware::Chunked;
use SockJS
fo = JSON::encode_json(
        {
              websocket => $self->{websocket} ? JSON::true
            : JSON::false,
            cookie_needed => $self->{cookie} ? JSON::true
            : JSON::fa
        }
    );

    return [
        200,
        [
            'Content-Type'  => 'application/json; charset=UTF-8',
            'Content-Length' => length($info),
        ],
        [$info]
    ];
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS/Transport/WebSocket.pm ( view source; MetaCPAN )
use warnings;

use base 'SockJS::Transport::Base';

use Encode ();
use IO::Compress::Deflate;
use JSON ();
use AnyEvent::Handle;
use Protocol::WebSocket::Handshake::Server;

sub new {
    my $self = s
eq 'websocket') {
            my $json = JSON->new->utf8->allow_nonref(0);

            eval { $message = $json->decode($message) } || do {
                #warn "JSON error: $@\n";
                re
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS/Transport/JSONPSend.pm ( view source; MetaCPAN )
package SockJS::Transport::JSONPSend;

use strict;
use warnings;

use base 'SockJS::Transport::Base';

use JSON ();

sub new {
    my $self = shift->SUPER::new(@_);

    push @{$self->{allowed_methods
q 'ARRAY';

    my $json = JSON->new->utf8->allow_nonref(0);

    my $message;
    eval { $message = $json->decode($data) } || do {
        return $self->_return_error('Broken JSON encoding.');
    };
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS/Transport/XHRSend.pm ( view source; MetaCPAN )
 SockJS::Transport::XHRSend;

use strict;
use warnings;

use base 'SockJS::Transport::Base';

use JSON ();

sub new {
    my $self = shift->SUPER::new(@_);

    push @{$self->{allowed_methods}}, 'POST
gth $data;

    my $json = JSON->new->utf8->allow_nonref(0);

    my $message;
    eval { $message = $json->decode($data) } || do {
        return $self->_return_error('Broken JSON encoding.');
    };
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS/Session.pm ( view source; MetaCPAN )
package SockJS::Session;

use strict;
use warnings;

use JSON ();
use Encode ();

sub new {
    my $class = shift;
    my (%params) = @_;

    my $self = {};
    bless $self, $class;

    $self->{id} 
encode('UTF-8', $message) if Encode::is_utf8($message);
    }
    else {
        $message = 'a' . JSON->new->ascii(1)->encode([@_]) if @_;
    }

    return $self->{conn}->write($message);
}

sub clos

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.