upnp: rename resolve to discover.

This commit is contained in:
Christopher Jeffrey 2017-03-02 15:54:06 -08:00
parent 04735a1a37
commit 75877d2f22
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -298,19 +298,6 @@ UPNP.parseHeader = function parseHeader(str) {
return headers;
};
/**
* Discover gateway.
* @param {String?} host - Multicast IP.
* @param {Number?} port - Multicast port.
* @param {String?} gateway - Gateway type.
* @returns {Promise} Location string.
*/
UPNP.discover = co(function* discover(host, port, gateway) {
var upnp = new UPNP(host, port, gateway);
return yield upnp.discover();
});
/**
* Discover gateway and resolve service.
* @param {String?} host - Multicast IP.
@ -320,7 +307,7 @@ UPNP.discover = co(function* discover(host, port, gateway) {
* @returns {Promise} Service.
*/
UPNP.resolve = co(function* resolve(host, port, gateway, targets) {
UPNP.discover = co(function* discover(host, port, gateway, targets) {
var upnp = new UPNP(host, port, gateway);
var location = yield upnp.discover();
var service = yield upnp.resolve(location, targets);