The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Protocol::SocketIO::Message - Socket.IO message parsing and building

SYNOPSIS

    # Build messages
    $message = Protocol::SocketIO::Message->new(
        type     => 'disconnect',
        endpoint => '/test'
    );

    $message = Protocol::SocketIO::Message->new(
        type       => 'ack',
        message_id => 4,
        args       => ['A', 'B']
    );

    # Parse messages
    $message = Protocol::SocketIO::Message->new->parse('4:1::{"a":"b"}');

DESCRIPTION

Protocol::SocketIO::Message parsers and builds Socket.IO messages.

METHODS

new

parse

type

is_message

id

data

endpoint

to_bytes

to_string