
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
lms-discovery
Advanced tools
Logitech Media Server discovery for Node.js
npm install --save lms-discovery
// ESM
import discovery from 'lms-discovery';
// CJS
const discovery = require('lms-discovery');
discovery.on('discovered', (server) => {
console.log('Server discovered:', server);
});
discovery.on('lost', (server) => {
// Do something with lost server
});
discovery.start();
...
discovery.stop();
// Output
Server discovered: {
ip: '192.168.1.85', // Server's IP address
name: 'my-lms-server', // Server name
ver: '8.2.1', // Server version
uuid: '187fa185-d108-408b-a8bd-8f5a4bb855bd', // Unique identifier
jsonPort: '9000', // Port for JSON-RPC requests
cliPort: '9090' // Port for CLI commands and queries
}
Run example:
npm run example
start([options])
Starts the discovery service.
Params
options
: (optional and all properties optional)
broadcastAddress
: (string) network address used to transmit discovery requests. Default: 255.255.255.255
.discoveredTTL
: (number) how long in milliseconds to wait for a discovered server to respond to a subsqeuent discovery request before it is presumed lost. Only applicable for servers that do not advertise cliPort
. Default: 60000
(60 seconds).discoverInterval
: (number) how often in milliseconds to broadcast discovery requests. Default: 30000
(30 seconds).
discoveredTTL
must be larger thandiscoverInterval
.
stop()
Stops the discovery service.
getStatus()
Gets the status of the discovery service.
Returns
running
or stop
setDebug(enabled[, callback])
Whether to enable debug messages.
Params
enabled
: (boolean)callback
: (function)
callback
.on('discovered', (server) => ...)
Emitted when a server is discovered.
Listener Params
server
: ServerInfoon('error', (error) => ...)
Emitted when an error has occurred.
Listener Params
error
: (any)1.1.0:
discoveredTTL
timers, emit 'lost' events immediately as they occur for servers that advertise cliPort
.1.0.0:
0.1.0:
MIT
FAQs
Logitech Media Server discovery for Node.js
The npm package lms-discovery receives a total of 15 weekly downloads. As such, lms-discovery popularity was classified as not popular.
We found that lms-discovery 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
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.