
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
broadcast-stream
Advanced tools
A more obvious dgram broadcast.
broadcast stream has the correct defaults to just work for broadcast on your local network.
broadcast on a port on your local network.
var createStream = require('broadcast-stream')
var stream = createStream(8999)
stream.on('data', function (msg) {
console.log(msg.toString())
console.log(msg.address, msg.port, msg.echo)
})
setInterval(function () {
stream.write(new Buffer(new Date().toString(), 'utf8'))
}, 1000)
stream on the port. If loopback is false, do not output your own messages.
returns a stream.
msg is the message as a buffer,
msg also has msg.address and msg.port set to the address and port that originated the message.
if msg is a message that this stream sent, it will also have msg.loopback = true.
udp does not have back-pressure, but the stream api does. if the stream is paused, it will just drop messages. if when the stream is resumed, it will emit the latest message.
MIT
FAQs
a more obvious interface for local udp broadcast
The npm package broadcast-stream receives a total of 122 weekly downloads. As such, broadcast-stream popularity was classified as not popular.
We found that broadcast-stream demonstrated a not healthy version release cadence and project activity because the last version was released 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.