A WebSocket server package that mimics the Node.js `net` module API, yielding duplex streams instead of the traditional 'onmessage/send' WebSockets API. Version 0.1.4 is the latest stable release, though the package appears to be in early development with limited documentation and no recent updates. Compatible with simple-websocket, it is designed for IPFS and Protocol Labs projects, offering a stream-based approach for binary and text data. Differentiates from ws or socket.io by providing a Node.js stream interface, but lacks active maintenance.
npm install simple-websocket-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an HTTP server and attaches a WebSocket server, listening for duplex stream connections.
Consider using more actively maintained alternatives like 'ws' or 'uWebSockets.js'.
Always pass an http.createServer() instance to the constructor.
Implement custom error handling and monitor stream lifecycle.
Update to latest version or use 'Buffer.from' explicitly.
Use import WebSocketServer from 'simple-websocket-server' or const WebSocketServer = require('simple-websocket-server').defaultconst server = http.createServer(); const wss = new WebSocketServer({ server });npm install simple-websocket-server