websocket-framework

1.0.1 • Public • Published

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');

// Initialize WebSocket server options
const options = { port: 8080 };

// Create a new WebSocketFramework instance
const wsf = new WebSocketFramework(options);

// Start the WebSocket server
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.

Readme

Keywords

none

Package Sidebar

Install

npm i websocket-framework

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.38 kB

Total Files

4

Last publish

Collaborators

  • ttrentsou