Fast, thoroughly tested WebSocket client and server for Node.js
open sourceMITfree
ws is a WebSocket client and server implementation for Node.js, simple to use and fast, and it passes the Autobahn test suite as both server and client. It speaks the HyBi drafts 07 to 17, supports the permessage-deflate compression extension, can share an existing HTTP or HTTPS server between several WebSocket servers, and exposes connections as Node.js streams. Browser code uses the native WebSocket object instead.
Problems it solves
- run a WebSocket server in Node.js
- connect to a WebSocket server from a Node.js backend
- broadcast messages to all connected WebSocket clients
Features
- WebSocket server and client for Node.js
- passes the Autobahn test suite as server and client
- permessage-deflate compression, with tuning options
- attach to an external HTTP/S server, or share one between several servers
- client authentication, broadcast and round-trip-time examples
- Node.js streams API
Limitations
- It doesn't work in the browser: browser clients use the native WebSocket object.1
Alternatives
The same job
These do what ws does.
- Socket.IO Bidirectional and low-latency communication for every platform
