{"repo":"websockets/ws","free":true,"listed":false,"github":"https://github.com/websockets/ws","clone":"git clone https://github.com/websockets/ws.git","description":"Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js","language":"JavaScript","stars":22791,"topics":["websocket","javascript","websocket-client","websocket-server","rfc-6455","real-time","nodejs","node","websocket-compression"],"license":"MIT","category":"networking-infra","readme_excerpt":"ws: a Node.js WebSocket library ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation. Passes the quite extensive Autobahn test suite: [server][server-report], [client][client-report]. Note : This module does not work in the browser. The client in the docs is a reference to a backend with the role of a client in the WebSocket communication. Browser clients must use the native WebSocket object. To make the same code work seamlessly on Node.js and the browser, you can use one of the many wrappers available on npm, like isomorphic-ws. Table of Contents - Protocol support - Installing - Opt-in for performance - Legacy opt-in for performance - API docs - WebSocket compression - Usage examples - Sending and receiving text data - Sending binary data - Simple server - External HTTP/S server - Multiple servers sharing a single HTTP/S server - Client authentication - Server broadcast - Round-trip time - Use the Node.js streams API - Other examples - FAQ - How to get the IP address of the client? - How to detect and close broken connections? - How to connect via a proxy? - Changelog - License Protocol support - HyBi drafts 07-12 (Use the option protocolVersion: 8 ) - HyBi drafts 13-17 (Current default, alternatively option protocolVersion: 13 ) Installing Opt-in for performance [bufferutil][] is an optional module that can be installed alongside the ws module: This is a binary addon that improves the performance of certain operations such ","default_branch":null,"files":null,"tree":[],"storefront":"/r/websockets","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/websockets/ws/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}