Resolve a service string to its corresponding service.
Synopsis
Declared in <netbase.h>
std::vector<CService>
Lookup(
std::string const& name,
uint16_t portDefault,
bool fAllowLookup,
unsigned int nMaxSolutions,
DNSLookupFn dns_lookup_function = g_dns_lookup);
Return Value
The resulting services to which the specified service string resolved.
Parameters
Name |
Description |
name |
The string representing a service. Could be a name or a numerical IP address (IPv6 addresses should be in their disambiguated bracketed form), optionally followed by a uint16_t port number. (e.g. example.com:8333 or [2001:db8:85a3:8d3:1319:8a2e:370:7348]:420) |
portDefault |
The default port for resulting services if not specified by the service string. |
fAllowLookup |
Whether or not hostname lookups are permitted. If yes, external queries may be performed. |
nMaxSolutions |
The maximum number of results we want, specifying 0 means "as many solutions as we get." |
dns_lookup_function |
The resolver used to perform the lookup. |
Created with MrDocs