Resolve a service string with a numeric IP to its first corresponding service.

Synopsis

Declared in <netbase.h>

CService
LookupNumeric(
    std::string const& name,
    uint16_t portDefault = 0,
    DNSLookupFn dns_lookup_function = g_dns_lookup);

Return Value

The resulting CService if the resolution was successful, [::]:0 otherwise.

Parameters

Name

Description

name

The numeric service string to resolve.

portDefault

The port to use when the service string omits one.

dns_lookup_function

The resolver used to perform the lookup.

See Also

Lookup(const std::string&, uint16_t, bool, unsigned int, DNSLookupFn) for additional parameter descriptions.

Created with MrDocs