3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>ip::address</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../boost_asio.html" title="Boost.Asio">
8 <link rel="up" href="../reference.html" title="Reference">
9 <link rel="prev" href="io_service__work/_work.html" title="io_service::work::~work">
10 <link rel="next" href="ip__address/address.html" title="ip::address::address">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="io_service__work/_work.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="ip__address/address.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_asio.reference.ip__address"></a><a class="link" href="ip__address.html" title="ip::address">ip::address</a>
28 </h3></div></div></div>
30 Implements version-independent IP addresses.
32 <pre class="programlisting"><span class="keyword">class</span> <span class="identifier">address</span>
35 <a name="boost_asio.reference.ip__address.h0"></a>
36 <span class="phrase"><a name="boost_asio.reference.ip__address.member_functions"></a></span><a class="link" href="ip__address.html#boost_asio.reference.ip__address.member_functions">Member
39 <div class="informaltable"><table class="table">
60 <a class="link" href="ip__address/address.html" title="ip::address::address"><span class="bold"><strong>address</strong></span></a>
68 Construct an address from an IPv4 address.
71 Construct an address from an IPv6 address.
81 <a class="link" href="ip__address/from_string.html" title="ip::address::from_string"><span class="bold"><strong>from_string</strong></span></a>
86 Create an address from an IPv4 address string in dotted decimal
87 form, or from an IPv6 address in hexadecimal notation.
94 <a class="link" href="ip__address/is_loopback.html" title="ip::address::is_loopback"><span class="bold"><strong>is_loopback</strong></span></a>
99 Determine whether the address is a loopback address.
106 <a class="link" href="ip__address/is_multicast.html" title="ip::address::is_multicast"><span class="bold"><strong>is_multicast</strong></span></a>
111 Determine whether the address is a multicast address.
118 <a class="link" href="ip__address/is_unspecified.html" title="ip::address::is_unspecified"><span class="bold"><strong>is_unspecified</strong></span></a>
123 Determine whether the address is unspecified.
130 <a class="link" href="ip__address/is_v4.html" title="ip::address::is_v4"><span class="bold"><strong>is_v4</strong></span></a>
135 Get whether the address is an IP version 4 address.
142 <a class="link" href="ip__address/is_v6.html" title="ip::address::is_v6"><span class="bold"><strong>is_v6</strong></span></a>
147 Get whether the address is an IP version 6 address.
154 <a class="link" href="ip__address/operator_eq_.html" title="ip::address::operator="><span class="bold"><strong>operator=</strong></span></a>
159 Assign from another address.
162 Assign from an IPv4 address.
165 Assign from an IPv6 address.
172 <a class="link" href="ip__address/to_string.html" title="ip::address::to_string"><span class="bold"><strong>to_string</strong></span></a>
177 Get the address as a string in dotted decimal format.
184 <a class="link" href="ip__address/to_v4.html" title="ip::address::to_v4"><span class="bold"><strong>to_v4</strong></span></a>
189 Get the address as an IP version 4 address.
196 <a class="link" href="ip__address/to_v6.html" title="ip::address::to_v6"><span class="bold"><strong>to_v6</strong></span></a>
201 Get the address as an IP version 6 address.
208 <a name="boost_asio.reference.ip__address.h1"></a>
209 <span class="phrase"><a name="boost_asio.reference.ip__address.friends"></a></span><a class="link" href="ip__address.html#boost_asio.reference.ip__address.friends">Friends</a>
211 <div class="informaltable"><table class="table">
232 <a class="link" href="ip__address/operator_not__eq_.html" title="ip::address::operator!="><span class="bold"><strong>operator!=</strong></span></a>
237 Compare two addresses for inequality.
244 <a class="link" href="ip__address/operator_lt_.html" title="ip::address::operator<"><span class="bold"><strong>operator<</strong></span></a>
249 Compare addresses for ordering.
256 <a class="link" href="ip__address/operator_lt__eq_.html" title="ip::address::operator<="><span class="bold"><strong>operator<=</strong></span></a>
261 Compare addresses for ordering.
268 <a class="link" href="ip__address/operator_eq__eq_.html" title="ip::address::operator=="><span class="bold"><strong>operator==</strong></span></a>
273 Compare two addresses for equality.
280 <a class="link" href="ip__address/operator_gt_.html" title="ip::address::operator>"><span class="bold"><strong>operator></strong></span></a>
285 Compare addresses for ordering.
292 <a class="link" href="ip__address/operator_gt__eq_.html" title="ip::address::operator>="><span class="bold"><strong>operator>=</strong></span></a>
297 Compare addresses for ordering.
304 <a name="boost_asio.reference.ip__address.h2"></a>
305 <span class="phrase"><a name="boost_asio.reference.ip__address.related_functions"></a></span><a class="link" href="ip__address.html#boost_asio.reference.ip__address.related_functions">Related
308 <div class="informaltable"><table class="table">
328 <a class="link" href="ip__address/operator_lt__lt_.html" title="ip::address::operator<<"><span class="bold"><strong>operator<<</strong></span></a>
333 Output an address as a string.
339 The <a class="link" href="ip__address.html" title="ip::address"><code class="computeroutput"><span class="identifier">ip</span><span class="special">::</span><span class="identifier">address</span></code></a>
340 class provides the ability to use either IP version 4 or version 6 addresses.
343 <a name="boost_asio.reference.ip__address.h3"></a>
344 <span class="phrase"><a name="boost_asio.reference.ip__address.thread_safety"></a></span><a class="link" href="ip__address.html#boost_asio.reference.ip__address.thread_safety">Thread
348 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
351 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
354 <a name="boost_asio.reference.ip__address.h4"></a>
355 <span class="phrase"><a name="boost_asio.reference.ip__address.requirements"></a></span><a class="link" href="ip__address.html#boost_asio.reference.ip__address.requirements">Requirements</a>
358 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/ip/address.hpp</code>
361 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
364 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
365 <td align="left"></td>
366 <td align="right"><div class="copyright-footer">Copyright © 2003-2014 Christopher M. Kohlhoff<p>
367 Distributed under the Boost Software License, Version 1.0. (See accompanying
368 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>)
373 <div class="spirit-nav">
374 <a accesskey="p" href="io_service__work/_work.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="ip__address/address.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>