[#LookupHost-02] = LookupHost :mrdocs: `LookupHost` overloads == Synopses Declared in `<netbase.h>` Resolve a host string to its first corresponding network address. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<CNetAddr> xref:LookupHost-09.adoc[LookupHost]( std::string const& name, bool fAllowLookup, xref:DNSLookupFn.adoc[DNSLookupFn] dns_lookup_function = g_dns_lookup); ---- [.small]#xref:LookupHost-09.adoc[_» more..._]# Resolve a host string to its corresponding network addresses. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::vector<CNetAddr> xref:LookupHost-0b.adoc[LookupHost]( std::string const& name, unsigned int nMaxSolutions, bool fAllowLookup, xref:DNSLookupFn.adoc[DNSLookupFn] dns_lookup_function = g_dns_lookup); ---- [.small]#xref:LookupHost-0b.adoc[_» more..._]# == Return Value * The resulting network address to which the specified host string resolved or std::nullopt if host does not resolve to an address. * The resulting network addresses to which the specified host string resolved. == Parameters [cols="1,4"] |=== | Name| Description | *name* | The host name or numeric address to resolve. | *fAllowLookup* | Whether DNS lookups are permitted. | *dns_lookup_function* | The resolver used to perform the lookup. | *nMaxSolutions* | The maximum number of addresses to return; 0 means no limit. |=== == See Also LookupHost(const std::string&, unsigned int, bool, DNSLookupFn) for additional parameter descriptions. Lookup(const std::string&, uint16_t, bool, unsigned int, DNSLookupFn) for additional parameter descriptions. [.small]#Created with https://www.mrdocs.com[MrDocs]#