socket.io is a JavaScript library for real-time web applications. It has two parts: a clientside library that runs in the browser, and a server-side library for Node.js (see “The
Node.js Software Platform” on page 70.)
The client-side part of socket.io is an event-driven library that primarily uses the
WebSocket protocol, but if needed can fall back onto multiple other methods, such as
Adobe Flash sockets, AJAX long polling, and others, while providing the same interface.
It provides many advanced features, like associating multiple sockets with a server-side
room, broadcasting to multiple sockets, storing data associated with specific clients, and
managing asynchronous I/O.