node ssdpNode.js原生SSDP客户端和服务器
用法-客户端:
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');
下载地址
用户评论