• 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::resolve (3 of 12 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="../resolve.html" title="ip::basic_resolver::resolve">
9<link rel="prev" href="overload2.html" title="ip::basic_resolver::resolve (2 of 12 overloads)">
10<link rel="next" href="overload4.html" title="ip::basic_resolver::resolve (4 of 12 overloads)">
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="overload2.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../resolve.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="overload4.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.resolve.overload3"></a><a class="link" href="overload3.html" title="ip::basic_resolver::resolve (3 of 12 overloads)">ip::basic_resolver::resolve
28          (3 of 12 overloads)</a>
29</h5></div></div></div>
30<p>
31            Perform forward resolution of a query to a list of entries.
32          </p>
33<pre class="programlisting">results_type resolve(
34    string_view host,
35    string_view service);
36</pre>
37<p>
38            This function is used to resolve host and service names into a list of
39            endpoint entries.
40          </p>
41<h6>
42<a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.h0"></a>
43            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.parameters"></a></span><a class="link" href="overload3.html#boost_asio.reference.ip__basic_resolver.resolve.overload3.parameters">Parameters</a>
44          </h6>
45<div class="variablelist">
46<p class="title"><b></b></p>
47<dl class="variablelist">
48<dt><span class="term">host</span></dt>
49<dd><p>
50                  A string identifying a location. May be a descriptive name or a
51                  numeric address string. If an empty string and the passive flag
52                  has been specified, the resolved endpoints are suitable for local
53                  service binding. If an empty string and passive is not specified,
54                  the resolved endpoints will use the loopback address.
55                </p></dd>
56<dt><span class="term">service</span></dt>
57<dd><p>
58                  A string identifying the requested service. This may be a descriptive
59                  name or a numeric string corresponding to a port number. May be
60                  an empty string, in which case all resolved endpoints will have
61                  a port number of 0.
62                </p></dd>
63</dl>
64</div>
65<h6>
66<a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.h1"></a>
67            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.return_value"></a></span><a class="link" href="overload3.html#boost_asio.reference.ip__basic_resolver.resolve.overload3.return_value">Return
68            Value</a>
69          </h6>
70<p>
71            A range object representing the list of endpoint entries. A successful
72            call to this function is guaranteed to return a non-empty range.
73          </p>
74<h6>
75<a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.h2"></a>
76            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.exceptions"></a></span><a class="link" href="overload3.html#boost_asio.reference.ip__basic_resolver.resolve.overload3.exceptions">Exceptions</a>
77          </h6>
78<div class="variablelist">
79<p class="title"><b></b></p>
80<dl class="variablelist">
81<dt><span class="term">boost::system::system_error</span></dt>
82<dd><p>
83                  Thrown on failure.
84                </p></dd>
85</dl>
86</div>
87<h6>
88<a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.h3"></a>
89            <span class="phrase"><a name="boost_asio.reference.ip__basic_resolver.resolve.overload3.remarks"></a></span><a class="link" href="overload3.html#boost_asio.reference.ip__basic_resolver.resolve.overload3.remarks">Remarks</a>
90          </h6>
91<p>
92            On POSIX systems, host names may be locally defined in the file <code class="computeroutput">/etc/hosts</code>.
93            On Windows, host names may be defined in the file <code class="computeroutput">c:\windows\system32\drivers\etc\hosts</code>.
94            Remote host name resolution is performed using DNS. Operating systems
95            may use additional locations when resolving host names (such as NETBIOS
96            names on Windows).
97          </p>
98<p>
99            On POSIX systems, service names are typically defined in the file <code class="computeroutput">/etc/services</code>.
100            On Windows, service names may be found in the file <code class="computeroutput">c:\windows\system32\drivers\etc\services</code>.
101            Operating systems may use additional locations when resolving service
102            names.
103          </p>
104</div>
105<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
106<td align="left"></td>
107<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
108      Kohlhoff<p>
109        Distributed under the Boost Software License, Version 1.0. (See accompanying
110        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>)
111      </p>
112</div></td>
113</tr></table>
114<hr>
115<div class="spirit-nav">
116<a accesskey="p" href="overload2.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../resolve.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="overload4.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
117</div>
118</body>
119</html>
120