Socket.IO Packet

Packets are encoded in the Socket.IO protocol. Read a breakdown of the sample session or read more about the session lifecycle.

Packet Contents

DescriptionData typeOptional
A packet typeinteger
A namespacestring
A payloadObject or Arrayx
An acknowledgement IDintegerx

Packet Types

TypeIDUsage
CONNECT0Used during the connection to a namespace.
DISCONNECT1Used when disconnecting from a namespace.
EVENT2Used to send data to the other side.
ACK3Used to acknowledge an event.
CONNECT_ERROR4Used during the connection to a namespace.
BINARY_EVENT5Used to send binary data to the other side.
BINARY_ACK6Used to acknowledge an event (the response includes binary data).