Group
Extension

Matches 1

Protocol-SocketIO ( V/VT/VTI/Protocol-SocketIO-0.07.tar.gz, VTI, 2017; MetaCPAN )
Protocol-SocketIO/lib/Protocol/SocketIO/Message.pm ( view source; MetaCPAN )
 JSON   ();

use overload '""' => sub { $_[0]->to_string }, fallback => 1;

our %TYPES = (
    'disconnect'   => 0,
    'connect'      => 1,
    'heartbeat'    => 2,
    'message'      => 3,
    'json
shift;

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

    $self->{type} ||= ref $self->{data} ? 'json_message' : 'message';

    if ($self->{type} eq 'connect' || $self->{type} eq 'heartbeat') {
    
}

sub is_message {
    my $self = shift;

    return $self->type eq 'message' || $self->type eq 'json_message';
}

sub parse {
    my $self = shift;
    my ($string) = @_;

    return unless defined 

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