Skip to main content

Module socketio

Module socketio 

Source
Expand description

The socket.io packet codec (socket.io-parser 4.2 rules), without I/O.

data always holds the JSON payload exactly as it goes over the wire. For BINARY_EVENT and BINARY_ACK that JSON contains {"_placeholder":true,"num":n} objects that refer to attachments[n] (socket.io-parser deconstructPacket / reconstructPacket).

Structs§

Packet
A packet which gets sent or received during in the socket.io protocol.

Enums§

PacketId
An enumeration of the different Packet types in the socket.io protocol.

Constants§

MAX_ATTACHMENTS
socket.io-parser Decoder default maxAttachments.
RESERVED_EVENTS
Event names the socket.io client and server reserve (socket.io-parser RESERVED_EVENTS).

Functions§

is_reserved_event
Whether socket.io reserves name (it cannot be emitted or received as an event).
placeholder
The placeholder for attachments[num].