1. 首页
  2. 考试认证
  3. 其它
  4. node ssdpNode.js原生SSDP客户端和服务器

node ssdpNode.js原生SSDP客户端和服务器

上传者: 2024-12-11 13:19:01上传 ZIP文件 3.37KB 热度 9次

用法-客户端:


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');

下载地址
用户评论