The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

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