WebSocket Framework
WebSocket Framework is a lightweight JavaScript library for creating WebSocket servers in Node.js applications.
Installation
You can install the WebSocket Framework via npm:
npm install websocket-framework
Usage
const WebSocketFramework = require('websocket-framework');
const options = { port: 8080 };
const wsf = new WebSocketFramework(options);
wsf.start();
Broadcasting Messages
You can broadcast messages to all connected clients using the broadcast
method:
const message = 'Hello, world!';
wsf.broadcast(message);
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.