New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

buffer-broadcaster

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-broadcaster

Broadcasting buffers trhough websockets

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

buffer-broadcaster

Websocket client for compressing and then broadcasting large buffers.

Install

npm i buffer-broadcaster

Usage

For using the library, you must create a broadcaster using the launchBroadcaster method, as such:


const bp = require('buffer-broadcaster')
const port = 7000 // port through where the sockets will be emited

const broadcaster = bp.launchBroadcaster(port)

Once you've done that, you have on hold a new empity Buffer. As you gather your data, you can append it just like that:


broadcaster.appendBuffer(dataBuffer)

After you have all the data you need to transmit, you broadcast it, cleaning the buffer on hold.


broadcaster.broadcast()

Keywords

buffer

FAQs

Package last updated on 02 Oct 2020

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