• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>ip::basic_resolver_query::basic_resolver_query (4 of 4 overloads)</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
8<link rel="up" href="../basic_resolver_query.html" title="ip::basic_resolver_query::basic_resolver_query">
9<link rel="prev" href="overload3.html" title="ip::basic_resolver_query::basic_resolver_query (3 of 4 overloads)">
10<link rel="next" href="../canonical_name.html" title="ip::basic_resolver_query::canonical_name">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="overload3.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_resolver_query.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../canonical_name.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4"></a><a class="link" href="overload4.html" title="ip::basic_resolver_query::basic_resolver_query (4 of 4 overloads)">ip::basic_resolver_query::basic_resolver_query
28          (4 of 4 overloads)</a>
29</h5></div></div></div>
30<p>
31            Construct with specified host name and service name for a given protocol.
32          </p>
33<pre class="programlisting">basic_resolver_query(
34    const protocol_type &amp; protocol,
35    const std::string &amp; host,
36    const std::string &amp; service,
37    resolver_query_base::flags resolve_flags = address_configured);
38</pre>
39<p>
40            This constructor is typically used to perform name resolution for communication
41            with remote hosts.
42          </p>
43<h6>
44<a name="boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.h0"></a>
45            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.parameters"></a></span><a class="link" href="overload4.html#boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.parameters">Parameters</a>
46          </h6>
47<div class="variablelist">
48<p class="title"><b></b></p>
49<dl class="variablelist">
50<dt><span class="term">protocol</span></dt>
51<dd><p>
52                  A protocol object, normally representing either the IPv4 or IPv6
53                  version of an internet protocol.
54                </p></dd>
55<dt><span class="term">host</span></dt>
56<dd><p>
57                  A string identifying a location. May be a descriptive name or a
58                  numeric address string. If an empty string and the passive flag
59                  has been specified, the resolved endpoints are suitable for local
60                  service binding. If an empty string and passive is not specified,
61                  the resolved endpoints will use the loopback address.
62                </p></dd>
63<dt><span class="term">service</span></dt>
64<dd><p>
65                  A string identifying the requested service. This may be a descriptive
66                  name or a numeric string corresponding to a port number. May be
67                  an empty string, in which case all resolved endpoints will have
68                  a port number of 0.
69                </p></dd>
70<dt><span class="term">resolve_flags</span></dt>
71<dd><p>
72                  A set of flags that determine how name resolution should be performed.
73                  The default flags are suitable for communication with remote hosts.
74                </p></dd>
75</dl>
76</div>
77<h6>
78<a name="boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.h1"></a>
79            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.remarks"></a></span><a class="link" href="overload4.html#boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4.remarks">Remarks</a>
80          </h6>
81<p>
82            On POSIX systems, host names may be locally defined in the file <code class="computeroutput">/etc/hosts</code>.
83            On Windows, host names may be defined in the file <code class="computeroutput">c:\windows\system32\drivers\etc\hosts</code>.
84            Remote host name resolution is performed using DNS. Operating systems
85            may use additional locations when resolving host names (such as NETBIOS
86            names on Windows).
87          </p>
88<p>
89            On POSIX systems, service names are typically defined in the file <code class="computeroutput">/etc/services</code>.
90            On Windows, service names may be found in the file <code class="computeroutput">c:\windows\system32\drivers\etc\services</code>.
91            Operating systems may use additional locations when resolving service
92            names.
93          </p>
94</div>
95<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
96<td align="left"></td>
97<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
98      Kohlhoff<p>
99        Distributed under the Boost Software License, Version 1.0. (See accompanying
100        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
101      </p>
102</div></td>
103</tr></table>
104<hr>
105<div class="spirit-nav">
106<a accesskey="p" href="overload3.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_resolver_query.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../canonical_name.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
107</div>
108</body>
109</html>
110