control-freak-ide/server/nodejs/testUPNPClient.js
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

13 lines
368 B
JavaScript

var Client = require('node-ssdp').Client
, client = new Client();
client.on('response', function (headers, statusCode, rinfo) {
console.log('Got a response to an m-search.',headers);
});
// search for a service type
client.search('urn:schemas-upnp-org:service:DeviceServer:1');
// Or get a list of all services on the network
//client.search('ssdp:all');