socket.io is a JavaScript library that allows for realtime, bi-directional communication between web clients and servers. It is composed of two parts: a Node.js server and a JavaScript client library that runs in the browser.
socket.io is focused on both reliability and speed, delivering an immensely powerful, fast and yet easy to use realtime engine that’s used by just about everyone: from Microsoft Office and Zendesk to hackathon winners and small startups.
SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server. Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of browser-specific transport protocols and presents them through WebSocket-like abstractions.