Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

ip::basic_resolver_query::basic_resolver_query (2 of 4 overloads)

Construct with specified service name for a given protocol.

    const protocol_type & protocol,
    const std::string & service,
    resolver_query_base::flags resolve_flags = passive|address_configured);

This constructor is typically used to perform name resolution for local service binding with a specific protocol version.



A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.


A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number.


A set of flags that determine how name resolution should be performed. The default flags are suitable for local service binding.


On POSIX systems, service names are typically defined in the file /etc/services. On Windows, service names may be found in the file c:\windows\system32\drivers\etc\services. Operating systems may use additional locations when resolving service names.