用法 - 客户端:


var SSDP = require('ssdp').SSDP;

var client = new SSDP;

client.on('notify', function () {

  console.log('Got a notification.');

});

client.on('response', function inResponse(msg, rinfo) {

  console.log('Got a response to an m-search.');

});

client.search('urn:schemas-upnp-org:service:ContentDirectory:1'); // 或者,如果你想搜索所有内容

client.search('ssdp:all');