// the find
sockjs/sockjs-node
WebSocket emulation - Node.js server
SockJS-node is the Node.js server half of the SockJS protocol, which wraps WebSockets with a polling fallback ladder (XHR streaming, EventSource, JSONP, etc.) so real-time connections survive ancient proxies and browsers that can't do WebSockets. It's for teams that need guaranteed delivery across hostile network environments — think corporate proxies, old mobile browsers, or load balancers that strip upgrade headers. If your users are all on modern browsers behind sane infrastructure, you don't need this.
The transport fallback chain is battle-tested and covers genuinely awkward edge cases (JSONP polling, htmlfile for IE, JSESSIONID sticky sessions). The protocol separation — server/session/transport as distinct layers in lib/ — is clean and makes adding transports straightforward. The security note on cookies and CSRF in iframe-based transports is correct and the deliberate decision to not expose cookies to app code is the right call. HAProxy integration and session-affinity docs are practical and production-oriented.
The README banner warns this is pre-release documentation for an unreleased version, but the repo has 2100 stars and is actively used — that warning has probably been there for years and is just confusing noise. No TypeScript types: in 2026 shipping a plain-JS library with no .d.ts is a real friction point for any project on TS. The test story requires a Python test suite from a separate repo (sockjs-protocol) plus a Karma suite from yet another repo (sockjs-client), making CI setup genuinely painful for contributors. JSONP polling and htmlfile transports exist purely for IE-era compatibility; there's no mechanism to drop them, and carrying that dead weight adds surface area without benefit for anyone not targeting a museum.