Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
websocket-framework
Advanced tools
WebSocket Framework is a lightweight JavaScript library for creating WebSocket servers in Node.js applications.
WebSocket Framework is a lightweight JavaScript library for creating WebSocket servers in Node.js applications.
You can install the WebSocket Framework via npm:
npm install websocket-framework
const WebSocketFramework = require('websocket-framework');
// Initialize WebSocket server options
const options = { port: 8080 };
// Create a new WebSocketFramework instance
const wsf = new WebSocketFramework(options);
// Start the WebSocket server
wsf.start();
You can broadcast messages to all connected clients using the broadcast
method:
const message = 'Hello, world!';
wsf.broadcast(message);
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
WebSocket Framework is a lightweight JavaScript library for creating WebSocket servers in Node.js applications.
We found that websocket-framework demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.