A node.js SSDP client and server library.
npm install node-ssdp
There is another package called
ssdp which is the original unmaintained version. Make sure to install
var Client = Clientclient = ;client;// search for a service typeclient;// Or get a list of all services on the networkclient;
var Server = Serverserver =;server;server;server;server;server;server;// start the serverserverstart;process
Take a look at
example directory as well to see examples or client and server.
new SSDP([options, [socket]])
SSDP constructor accepts an optional configuration object and an optional initialized socket. At the moment, the following is supported:
ssdpSigString SSDP signature. Default:
node.js/NODE_VERSION UPnP/1.1 node-ssdp/PACKAGE_VERSION
ssdpIpString SSDP multicast group. Default:
ssdpPortNumber SSDP port. Default:
ssdpTtlNumber Multicast TTL. Default:
advertiseevent frequency (ms). Default: 10 sec.
unicastHostString IP address or hostname of server where SSDP service is running. This is used in
unicastBindPortNumber Port for the SSDP client service to bind to. Defaults to 0 which uses a randomly selected available port.
locationString URL pointing to description of your service, or a function which returns that URL
udnString Unique Device Name. Default:
descriptionString Path to description file. Default:
ttlNumber Packet TTL. Default:
allowWildcardsBoolean Accept wildcards (
You can enable logging via an environment variable
DEBUG=node-ssdp* to enable all logs. To enable only client or server logs, use
(The MIT License)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.