A pull-stream-based WebSocket client and server library, actively maintained as a friendly fork of the unmaintained pull-ws. Current version 3.4.2 (stable, last updated 2022). Provides a simple pull-stream interface for WebSocket connections, supporting both client (connect) and server (createServer) modes. Key differentiators: uses pull-streams for backpressure and composability, works in Node.js and browsers (with bundlers), and supports TLS and HTTP server integration. Compared to raw ws or WebSocket, it integrates seamlessly with the pull-stream ecosystem for streaming data.
npm install pull-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic server and client using pull-stream duplex connection. Server echoes data; client sends messages and logs responses.
Update all imports from 'pull-ws' to 'pull-websocket'.
Always explicitly set binary: true when expecting binary data across platforms.
Use import { connect, createServer } from 'pull-websocket' instead.Use pull-goodbye or design protocol to handle WebSocket's full-duplex nature.
Ensure bundler (webpack, browserify) correctly polyfills or excludes ws for browser targets.
Use import { connect } from 'pull-websocket' instead.Install pull-stream: npm install pull-stream, and import pull: import pull from 'pull-stream'.
Ensure server is started and URL is correct (ws:// or wss://).
Use pull(stream, ...) directly on the callback parameter passed to createServer.
Install ws: npm install ws, or use a bundler for browser.