Skip to content

Commit

Permalink
Merge pull request #63 from driskell/custom_bind_port
Browse files Browse the repository at this point in the history
Allow custom bind port
  • Loading branch information
diversario committed Aug 31, 2016
2 parents 7bf4f6f + 8c44126 commit 14a3a1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -72,6 +72,7 @@ SSDP constructor accepts an optional configuration object and an optional initia
- `ssdpTtl` _Number_ Multicast TTL. Default: `1`
- `adInterval` _Number_ `advertise` event frequency (ms). Default: 10 sec.
- `unicastHost` _String_ IP address or hostname of server where SSDP service is running. This is used in `HOST` header. Default: `0.0.0.0`.
- `unicostBindPort` _Number_ Port for the SSDP service to bind to. Defaults to 0 which uses a randomly selected available port.
- `location` _String_ URL pointing to description of your service, or a function which returns that URL
- `udn` _String_ Unique Device Name. Default: `uuid:f40c2981-7329-40b7-8b04-27f187aecfb5`.
- `description` _String_ Path to description file. Default: `upnp/desc.php`.
Expand Down
2 changes: 1 addition & 1 deletion lib/client.js
Expand Up @@ -23,7 +23,7 @@ util.inherits(SsdpClient, SSDP)
* @param [cb]
*/
SsdpClient.prototype.start = function (cb) {
this._start(0, this._unicastHost, cb)
this._start(this._unicastBindPort, this._unicastHost, cb)
}


Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Expand Up @@ -96,6 +96,7 @@ SSDP.prototype._init = function (opts) {
}

this._unicastHost = opts.unicastHost || '0.0.0.0'
this._unicastBindPort = opts.unicastBindPort || 0
this._ssdpServerHost = this._ssdpIp + ':' + this._ssdpPort

this._usns = {}
Expand Down

0 comments on commit 14a3a1a

Please sign in to comment.