
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
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
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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.