[#LookupHost-09] = LookupHost :mrdocs: Resolve a host string to its first corresponding network address. == Synopsis Declared in `<netbase.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<CNetAddr> LookupHost( std::string const& name, bool fAllowLookup, xref:DNSLookupFn.adoc[DNSLookupFn] dns_lookup_function = g_dns_lookup); ---- == Return Value The resulting network address to which the specified host string resolved or std::nullopt if host does not resolve to an address. == 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. |=== == See Also LookupHost(const std::string&, unsigned int, bool, DNSLookupFn) for additional parameter descriptions. [.small]#Created with https://www.mrdocs.com[MrDocs]#