Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

websocket-framework

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-framework

WebSocket Framework is a lightweight JavaScript library for creating WebSocket servers in Node.js applications.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 03 Mar 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc