asio C++ library

PrevUpHomeNext
ip::basic_resolver_query::basic_resolver_query (1 of 6 overloads)

Construct with specified service name for any protocol.

basic_resolver_query(
    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.

Parameters

service

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

resolve_flags

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

Remarks

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.


PrevUpHomeNext