cordova-plugin-ssdp

1.0.0-alpha.1 • Public • Published

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

search:

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

Package Sidebar

Install

npm i cordova-plugin-ssdp

Weekly Downloads

0

Version

1.0.0-alpha.1

License

Apache 2.0

Unpacked Size

37.5 kB

Total Files

26

Last publish

Collaborators

  • lllleeee