[#Lookup-0d] = Lookup :mrdocs: `Lookup` overloads == Synopses Declared in `<netbase.h>` Resolve a service string to its first corresponding service. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<CService> xref:Lookup-0b.adoc[Lookup]( std::string const& name, uint16_t portDefault, bool fAllowLookup, xref:DNSLookupFn.adoc[DNSLookupFn] dns_lookup_function = g_dns_lookup); ---- [.small]#xref:Lookup-0b.adoc[_» more..._]# Resolve a service string to its corresponding service. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::vector<CService> xref:Lookup-04.adoc[Lookup]( std::string const& name, uint16_t portDefault, bool fAllowLookup, unsigned int nMaxSolutions, xref:DNSLookupFn.adoc[DNSLookupFn] dns_lookup_function = g_dns_lookup); ---- [.small]#xref:Lookup-04.adoc[_» more..._]# == Return Value * The first resolved service, or std::nullopt if the string does not resolve. * The resulting services to which the specified service string resolved. == Parameters [cols="1,4"] |=== | Name| Description | *name* | The service string to resolve. | *portDefault* | The port to use when the service string omits one. | *fAllowLookup* | Whether DNS lookups are permitted. | *dns_lookup_function* | The resolver used to perform the lookup. | *nMaxSolutions* | The maximum number of results we want, specifying 0 means "as many solutions as we get." |=== == See Also Lookup(const std::string&, uint16_t, bool, unsigned int, DNSLookupFn) for additional parameter descriptions. [.small]#Created with https://www.mrdocs.com[MrDocs]#