upnp: rename resolve to discover.
This commit is contained in:
parent
04735a1a37
commit
75877d2f22
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user