diversario/node-ssdp

SsdpClient does not have a stop()

axit-joost opened this issue · 3 comments

Currently, the SsdpClient does not expose a stop() method. So if one wants to scan for devices for 10 seconds and then stop, the only way you can do that now is to do a setTimeout() and call process.exit(); rendering the use of the SsdpClient limited to only command line tools.

SSDP does have a private _stop() method, which SsdpClient does not use. Is that due to the fact that its original intended functionality is to be used by SsdpServer to stop advertising and unbinding the socket?

When i am using Ssdpclient.stop() with my own ssdpIp, it is throwing an error as
"cannot read addMembership property of null".
Please help.

Which version does this happen on, @debanshur ?

2.7.2