web-realtime-socket-io

Installation
SKILL.md

Socket.IO Real-Time Communication Patterns

Quick Guide: Socket.IO is a protocol layered over WebSocket, not an implementation of it — its client and a plain WebSocket server cannot talk to each other in either direction. What the layer buys is transport fallback, automatic reconnection, rooms, namespaces and acknowledgments, for about 14.5KB gzipped. The facts that change the answer: auth accepts a function that re-runs on every reconnection, timeout and ackTimeout are different clocks, and socket.recovered (v4.6.0+) tells you whether missed events were replayed or a full state refresh is owed.

Detailed Resources:

  • examples/core.md — typed socket factory, connection and event hooks, emit-with-ack, offline queue, volatile events, Manager multiplexing
  • examples/authentication.md — token auth, refresh on reconnect, per-namespace auth, cookie auth, auth state machine
  • examples/rooms.md — room manager and hooks, multi-room chat, namespace sockets, conditional namespace access
  • reference.md — client options, socket and manager events, disconnect reasons, comparison table, checklists

Which path applies

  • One connection to the default namespaceio(url, options) creates the socket and its Manager together. This is the shape in examples/core.md and covers most apps.
  • Several namespaces over one connection — construct new Manager(url) yourself and call manager.socket("/chat") per namespace. The namespaces share a single transport and can each carry their own auth, which is what makes per-namespace authorization possible. See examples/rooms.md.

Calling io() more than once against the same URL opens a second transport rather than multiplexing — the Manager is what shares one.

Installs
58
GitHub Stars
24
First Seen
Mar 19, 2026
web-realtime-socket-io — agents-inc/skills