1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>ip::basic_endpoint</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="../reference.html" title="Reference"> 9<link rel="prev" href="ip__basic_address_range_lt__address_v6__gt_/operator_eq_.html" title="ip::basic_address_range< address_v6 >::operator="> 10<link rel="next" href="ip__basic_endpoint/address.html" title="ip::basic_endpoint::address"> 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="ip__basic_address_range_lt__address_v6__gt_/operator_eq_.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__basic_endpoint/address.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.reference.ip__basic_endpoint"></a><a class="link" href="ip__basic_endpoint.html" title="ip::basic_endpoint">ip::basic_endpoint</a> 28</h3></div></div></div> 29<p> 30 Describes an endpoint for a version-independent IP socket. 31 </p> 32<pre class="programlisting">template< 33 typename <a class="link" href="InternetProtocol.html" title="Internet protocol requirements">InternetProtocol</a>> 34class basic_endpoint 35</pre> 36<h5> 37<a name="boost_asio.reference.ip__basic_endpoint.h0"></a> 38 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.types"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.types">Types</a> 39 </h5> 40<div class="informaltable"><table class="table"> 41<colgroup> 42<col> 43<col> 44</colgroup> 45<thead><tr> 46<th> 47 <p> 48 Name 49 </p> 50 </th> 51<th> 52 <p> 53 Description 54 </p> 55 </th> 56</tr></thead> 57<tbody> 58<tr> 59<td> 60 <p> 61 <a class="link" href="ip__basic_endpoint/data_type.html" title="ip::basic_endpoint::data_type"><span class="bold"><strong>data_type</strong></span></a> 62 </p> 63 </td> 64<td> 65 <p> 66 The type of the endpoint structure. This type is dependent on the 67 underlying implementation of the socket layer. 68 </p> 69 </td> 70</tr> 71<tr> 72<td> 73 <p> 74 <a class="link" href="ip__basic_endpoint/protocol_type.html" title="ip::basic_endpoint::protocol_type"><span class="bold"><strong>protocol_type</strong></span></a> 75 </p> 76 </td> 77<td> 78 <p> 79 The protocol type associated with the endpoint. 80 </p> 81 </td> 82</tr> 83</tbody> 84</table></div> 85<h5> 86<a name="boost_asio.reference.ip__basic_endpoint.h1"></a> 87 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.member_functions"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.member_functions">Member 88 Functions</a> 89 </h5> 90<div class="informaltable"><table class="table"> 91<colgroup> 92<col> 93<col> 94</colgroup> 95<thead><tr> 96<th> 97 <p> 98 Name 99 </p> 100 </th> 101<th> 102 <p> 103 Description 104 </p> 105 </th> 106</tr></thead> 107<tbody> 108<tr> 109<td> 110 <p> 111 <a class="link" href="ip__basic_endpoint/address.html" title="ip::basic_endpoint::address"><span class="bold"><strong>address</strong></span></a> 112 </p> 113 </td> 114<td> 115 <p> 116 Get the IP address associated with the endpoint. <br> <span class="silver"> —</span><br> 117 Set the IP address associated with the endpoint. 118 </p> 119 </td> 120</tr> 121<tr> 122<td> 123 <p> 124 <a class="link" href="ip__basic_endpoint/basic_endpoint.html" title="ip::basic_endpoint::basic_endpoint"><span class="bold"><strong>basic_endpoint</strong></span></a> <span class="silver">[constructor]</span> 125 </p> 126 </td> 127<td> 128 <p> 129 Default constructor. <br> <span class="silver"> —</span><br> Construct an endpoint using 130 a port number, specified in the host's byte order. The IP address 131 will be the any address (i.e. INADDR_ANY or in6addr_any). This 132 constructor would typically be used for accepting new connections. 133 <br> <span class="silver"> —</span><br> Construct an endpoint using a port number and an 134 IP address. This constructor may be used for accepting connections 135 on a specific interface or for making a connection to a remote 136 endpoint. <br> <span class="silver"> —</span><br> Copy constructor. <br> <span class="silver"> —</span><br> Move constructor. 137 </p> 138 </td> 139</tr> 140<tr> 141<td> 142 <p> 143 <a class="link" href="ip__basic_endpoint/capacity.html" title="ip::basic_endpoint::capacity"><span class="bold"><strong>capacity</strong></span></a> 144 </p> 145 </td> 146<td> 147 <p> 148 Get the capacity of the endpoint in the native type. 149 </p> 150 </td> 151</tr> 152<tr> 153<td> 154 <p> 155 <a class="link" href="ip__basic_endpoint/data.html" title="ip::basic_endpoint::data"><span class="bold"><strong>data</strong></span></a> 156 </p> 157 </td> 158<td> 159 <p> 160 Get the underlying endpoint in the native type. 161 </p> 162 </td> 163</tr> 164<tr> 165<td> 166 <p> 167 <a class="link" href="ip__basic_endpoint/operator_eq_.html" title="ip::basic_endpoint::operator="><span class="bold"><strong>operator=</strong></span></a> 168 </p> 169 </td> 170<td> 171 <p> 172 Assign from another endpoint. <br> <span class="silver"> —</span><br> Move-assign from another 173 endpoint. 174 </p> 175 </td> 176</tr> 177<tr> 178<td> 179 <p> 180 <a class="link" href="ip__basic_endpoint/port.html" title="ip::basic_endpoint::port"><span class="bold"><strong>port</strong></span></a> 181 </p> 182 </td> 183<td> 184 <p> 185 Get the port associated with the endpoint. The port number is always 186 in the host's byte order. <br> <span class="silver"> —</span><br> Set the port associated 187 with the endpoint. The port number is always in the host's byte 188 order. 189 </p> 190 </td> 191</tr> 192<tr> 193<td> 194 <p> 195 <a class="link" href="ip__basic_endpoint/protocol.html" title="ip::basic_endpoint::protocol"><span class="bold"><strong>protocol</strong></span></a> 196 </p> 197 </td> 198<td> 199 <p> 200 The protocol associated with the endpoint. 201 </p> 202 </td> 203</tr> 204<tr> 205<td> 206 <p> 207 <a class="link" href="ip__basic_endpoint/resize.html" title="ip::basic_endpoint::resize"><span class="bold"><strong>resize</strong></span></a> 208 </p> 209 </td> 210<td> 211 <p> 212 Set the underlying size of the endpoint in the native type. 213 </p> 214 </td> 215</tr> 216<tr> 217<td> 218 <p> 219 <a class="link" href="ip__basic_endpoint/size.html" title="ip::basic_endpoint::size"><span class="bold"><strong>size</strong></span></a> 220 </p> 221 </td> 222<td> 223 <p> 224 Get the underlying size of the endpoint in the native type. 225 </p> 226 </td> 227</tr> 228</tbody> 229</table></div> 230<h5> 231<a name="boost_asio.reference.ip__basic_endpoint.h2"></a> 232 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.friends"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.friends">Friends</a> 233 </h5> 234<div class="informaltable"><table class="table"> 235<colgroup> 236<col> 237<col> 238</colgroup> 239<thead><tr> 240<th> 241 <p> 242 Name 243 </p> 244 </th> 245<th> 246 <p> 247 Description 248 </p> 249 </th> 250</tr></thead> 251<tbody> 252<tr> 253<td> 254 <p> 255 <a class="link" href="ip__basic_endpoint/operator_not__eq_.html" title="ip::basic_endpoint::operator!="><span class="bold"><strong>operator!=</strong></span></a> 256 </p> 257 </td> 258<td> 259 <p> 260 Compare two endpoints for inequality. 261 </p> 262 </td> 263</tr> 264<tr> 265<td> 266 <p> 267 <a class="link" href="ip__basic_endpoint/operator_lt_.html" title="ip::basic_endpoint::operator<"><span class="bold"><strong>operator<</strong></span></a> 268 </p> 269 </td> 270<td> 271 <p> 272 Compare endpoints for ordering. 273 </p> 274 </td> 275</tr> 276<tr> 277<td> 278 <p> 279 <a class="link" href="ip__basic_endpoint/operator_lt__eq_.html" title="ip::basic_endpoint::operator<="><span class="bold"><strong>operator<=</strong></span></a> 280 </p> 281 </td> 282<td> 283 <p> 284 Compare endpoints for ordering. 285 </p> 286 </td> 287</tr> 288<tr> 289<td> 290 <p> 291 <a class="link" href="ip__basic_endpoint/operator_eq__eq_.html" title="ip::basic_endpoint::operator=="><span class="bold"><strong>operator==</strong></span></a> 292 </p> 293 </td> 294<td> 295 <p> 296 Compare two endpoints for equality. 297 </p> 298 </td> 299</tr> 300<tr> 301<td> 302 <p> 303 <a class="link" href="ip__basic_endpoint/operator_gt_.html" title="ip::basic_endpoint::operator>"><span class="bold"><strong>operator></strong></span></a> 304 </p> 305 </td> 306<td> 307 <p> 308 Compare endpoints for ordering. 309 </p> 310 </td> 311</tr> 312<tr> 313<td> 314 <p> 315 <a class="link" href="ip__basic_endpoint/operator_gt__eq_.html" title="ip::basic_endpoint::operator>="><span class="bold"><strong>operator>=</strong></span></a> 316 </p> 317 </td> 318<td> 319 <p> 320 Compare endpoints for ordering. 321 </p> 322 </td> 323</tr> 324</tbody> 325</table></div> 326<h5> 327<a name="boost_asio.reference.ip__basic_endpoint.h3"></a> 328 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.related_functions"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.related_functions">Related 329 Functions</a> 330 </h5> 331<div class="informaltable"><table class="table"> 332<colgroup> 333<col> 334<col> 335</colgroup> 336<thead><tr> 337<th> 338 <p> 339 Name 340 </p> 341 </th> 342<th> 343 <p> 344 Description 345 </p> 346 </th> 347</tr></thead> 348<tbody><tr> 349<td> 350 <p> 351 <a class="link" href="ip__basic_endpoint/operator_lt__lt_.html" title="ip::basic_endpoint::operator<<"><span class="bold"><strong>operator<<</strong></span></a> 352 </p> 353 </td> 354<td> 355 <p> 356 Output an endpoint as a string. 357 </p> 358 </td> 359</tr></tbody> 360</table></div> 361<p> 362 The <a class="link" href="ip__basic_endpoint.html" title="ip::basic_endpoint"><code class="computeroutput">ip::basic_endpoint</code></a> 363 class template describes an endpoint that may be associated with a particular 364 socket. 365 </p> 366<h5> 367<a name="boost_asio.reference.ip__basic_endpoint.h4"></a> 368 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.thread_safety"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.thread_safety">Thread Safety</a> 369 </h5> 370<p> 371 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe. 372 </p> 373<p> 374 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe. 375 </p> 376<h5> 377<a name="boost_asio.reference.ip__basic_endpoint.h5"></a> 378 <span class="phrase"><a name="boost_asio.reference.ip__basic_endpoint.requirements"></a></span><a class="link" href="ip__basic_endpoint.html#boost_asio.reference.ip__basic_endpoint.requirements">Requirements</a> 379 </h5> 380<p> 381 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/ip/basic_endpoint.hpp</code> 382 </p> 383<p> 384 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 385 </p> 386</div> 387<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 388<td align="left"></td> 389<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 390 Kohlhoff<p> 391 Distributed under the Boost Software License, Version 1.0. (See accompanying 392 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>) 393 </p> 394</div></td> 395</tr></table> 396<hr> 397<div class="spirit-nav"> 398<a accesskey="p" href="ip__basic_address_range_lt__address_v6__gt_/operator_eq_.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__basic_endpoint/address.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 399</div> 400</body> 401</html> 402