🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more
Socket
Book a DemoInstallSign in
Socket

cordova-plugin-ssdp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-ssdp

Discover other devices in the same network. 用udp发现网络内的其他设备

latest
Source
npmnpm
Version
1.0.0-alpha.1
Version published
Maintainers
1
Created
Source

cordova-plugin-ssdp

listen:

ssdp.listen(searchTarget, successCallback, errorCallback)

ex:

  ssdp.listen('urn:domain-name:device:deviceType:ver', (message1, message2) => {
    console.log('listen success:', message1, message2);
  }, (error) => {
    console.warn('listen error:', error);
  });

ssdp.search(searchTarget, successCallback, errorCallback)

ex:

  ssdp.search('urn:domain-name:device:deviceType:ver', (message) => {
    try {
      let response = JSON.parse(message);
      console.log(response)
    } catch (e) {
      console.warn(e);
    }
  }, (error) => {
    console.log('search error:', error);
  });

Supported Platforms

  • Android

Keywords

ssdp

FAQs

Package last updated on 04 Nov 2019

Did you know?

Socket

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.

Install

Related posts