
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
websocketstream
Advanced tools
WebSocketStream provides a Node.js stream interface on top of WebSocket that works on Node.js and in the browser.
You can install the library with npm
for use with Node.js:
npm install websocketstream
or with Bower for use in the browser:
bower install WebSocketStream
'use strict';
var WebSocket = require('ws'),
webSocketServer = new WebSocket.Server({port: 8080}),
WebSocketStream = require('websocketstream');
webSocketServer.on('connection', function (webSocket) {
var stream = new WebSocketStream(webSocket);
stream.on('readable', function () {
console.log("Something just came in over the wire: " + stream.read());
});
stream.write("There's a place I know just east of here.");
});
'use strict';
require.config({
map: {
'*': {
'stream': 'Node-in-browser/lib/stream',
'util': 'Node-in-browser/lib/util'
}
}
});
require(['WebSocketStream/lib/main'], function (WebSocketStream) {
var webSocket = new WebSocket('ws://' + location.host),
stream = new WebSocketStream(webSocket);
stream.on('readable', function () {
console.log("Something just came in over the wire: " + stream.read());
});
stream.write("There's a place I know just east of here.");
});
Copyright 2013 David Braun
This file is part of WebSocketStream.
WebSocketStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
WebSocketStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with WebSocketStream. If not, see http://www.gnu.org/licenses/.
FAQs
a Stream interface on top of WebSocket
The npm package websocketstream receives a total of 3 weekly downloads. As such, websocketstream popularity was classified as not popular.
We found that websocketstream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.