qmetrics.net

Ws

Node.js WebSocket client and server library

The ws package implements WebSocket client and server roles for Node.js. It is not for browser runtimes; front ends should use the native WebSocket API or an isomorphic wrapper.

Overview

ws provides WebSocket client and server implementations aimed at Node.js backends. It covers HyBi draft versions and defaults to the current RFC 6455-era protocol level, with optional settings for older drafts.

The library passes the Autobahn conformance suite for both server and client roles. Documentation describes classes and helpers in a Node-style reference, with examples for text and binary messaging, standalone servers, attachment to external HTTP or HTTPS servers, shared HTTP servers, authentication, and broadcast patterns.

Optional permessage-deflate compression can be negotiated between endpoints. On the server the extension is off by default; on the client it is on by default, with guidance that compression adds memory and CPU cost. Older Node releases can load optional native add-ons for masking and UTF-8 validation; newer Node builds use built-in alternatives when available.

Examples also cover round-trip timing, the Node streams API, detecting stale connections with ping and pong, reading client addresses from sockets or proxy headers, and connecting through HTTP or SOCKS proxies via custom agents. Browser clients are out of scope for this module itself.

Key features

  • WebSocket client and server for Node.js
  • Autobahn test suite coverage
  • Permessage-deflate compression support
  • Attach to existing HTTP or HTTPS servers
  • Broadcast and authentication patterns
  • Ping and pong for liveness checks
  • Streams API integration
  • Proxy connection via custom agents

Use cases

  • Realtime backends on Node.js
  • Shared HTTP server with WebSocket upgrade
  • Binary and text message channels
  • Server-wide event broadcast
  • Low-level WebSocket protocol control

Tags

Similar software

Netty

Event-driven Java framework for protocol servers and clients

Netty is an asynchronous, event-driven network stack for building maintainable high-performance protocol servers and clients in Java.

★ 35.1k⟳ todayApache-2.0

Tokio

Rust runtime for reliable asynchronous network applications

Tokio is an event-driven, non-blocking I/O platform for asynchronous Rust programs. It supplies scheduling, timers, async TCP and UDP, and building blocks for network services.

★ 33.8k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

libuv

Cross-platform asynchronous I/O support library

libuv is a multi-platform library centered on non-blocking I/O. Node.js and several other runtimes embed it for networking and event handling.

★ 27.4k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

WebRTC

Pure Go WebRTC stack for real-time media

Pion WebRTC implements the WebRTC API in Go without cgo, enabling peer connections, media, data channels, and ICE across servers, desktops, mobile, and WebAssembly targets.

★ 16.9k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Workflow

C++ async networking and parallel workflow engine

Sogou C++ Workflow is an enterprise-style C++ engine for HTTP servers, async clients, DAG workflows, and parallel compute used in Sogou’s online backends.

★ 14.4k⟳ 2 days agoApache-2.0

PeerJS

Browser WebRTC library for peer data and media connections

PeerJS wraps WebRTC with a simple JavaScript API for encrypted peer-to-peer data channels and video or audio calls between browsers.

★ 13.5k⟳ 1 year agoMIT
Frameworks & PlatformsDesktop/CLI app