1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>socket_base</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="signal_set.html" title="signal_set"> 10<link rel="next" href="socket_base/broadcast.html" title="socket_base::broadcast"> 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="signal_set.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="socket_base/broadcast.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.socket_base"></a><a class="link" href="socket_base.html" title="socket_base">socket_base</a> 28</h3></div></div></div> 29<p> 30 The <a class="link" href="socket_base.html" title="socket_base"><code class="computeroutput">socket_base</code></a> 31 class is used as a base for the <a class="link" href="basic_stream_socket.html" title="basic_stream_socket"><code class="computeroutput">basic_stream_socket</code></a> 32 and <a class="link" href="basic_datagram_socket.html" title="basic_datagram_socket"><code class="computeroutput">basic_datagram_socket</code></a> 33 class templates so that we have a common place to define the shutdown_type 34 and enum. 35 </p> 36<pre class="programlisting">class socket_base 37</pre> 38<h5> 39<a name="boost_asio.reference.socket_base.h0"></a> 40 <span class="phrase"><a name="boost_asio.reference.socket_base.types"></a></span><a class="link" href="socket_base.html#boost_asio.reference.socket_base.types">Types</a> 41 </h5> 42<div class="informaltable"><table class="table"> 43<colgroup> 44<col> 45<col> 46</colgroup> 47<thead><tr> 48<th> 49 <p> 50 Name 51 </p> 52 </th> 53<th> 54 <p> 55 Description 56 </p> 57 </th> 58</tr></thead> 59<tbody> 60<tr> 61<td> 62 <p> 63 <a class="link" href="socket_base/broadcast.html" title="socket_base::broadcast"><span class="bold"><strong>broadcast</strong></span></a> 64 </p> 65 </td> 66<td> 67 <p> 68 Socket option to permit sending of broadcast messages. 69 </p> 70 </td> 71</tr> 72<tr> 73<td> 74 <p> 75 <a class="link" href="socket_base/bytes_readable.html" title="socket_base::bytes_readable"><span class="bold"><strong>bytes_readable</strong></span></a> 76 </p> 77 </td> 78<td> 79 <p> 80 IO control command to get the amount of data that can be read without 81 blocking. 82 </p> 83 </td> 84</tr> 85<tr> 86<td> 87 <p> 88 <a class="link" href="socket_base/debug.html" title="socket_base::debug"><span class="bold"><strong>debug</strong></span></a> 89 </p> 90 </td> 91<td> 92 <p> 93 Socket option to enable socket-level debugging. 94 </p> 95 </td> 96</tr> 97<tr> 98<td> 99 <p> 100 <a class="link" href="socket_base/do_not_route.html" title="socket_base::do_not_route"><span class="bold"><strong>do_not_route</strong></span></a> 101 </p> 102 </td> 103<td> 104 <p> 105 Socket option to prevent routing, use local interfaces only. 106 </p> 107 </td> 108</tr> 109<tr> 110<td> 111 <p> 112 <a class="link" href="socket_base/enable_connection_aborted.html" title="socket_base::enable_connection_aborted"><span class="bold"><strong>enable_connection_aborted</strong></span></a> 113 </p> 114 </td> 115<td> 116 <p> 117 Socket option to report aborted connections on accept. 118 </p> 119 </td> 120</tr> 121<tr> 122<td> 123 <p> 124 <a class="link" href="socket_base/keep_alive.html" title="socket_base::keep_alive"><span class="bold"><strong>keep_alive</strong></span></a> 125 </p> 126 </td> 127<td> 128 <p> 129 Socket option to send keep-alives. 130 </p> 131 </td> 132</tr> 133<tr> 134<td> 135 <p> 136 <a class="link" href="socket_base/linger.html" title="socket_base::linger"><span class="bold"><strong>linger</strong></span></a> 137 </p> 138 </td> 139<td> 140 <p> 141 Socket option to specify whether the socket lingers on close if 142 unsent data is present. 143 </p> 144 </td> 145</tr> 146<tr> 147<td> 148 <p> 149 <a class="link" href="socket_base/message_flags.html" title="socket_base::message_flags"><span class="bold"><strong>message_flags</strong></span></a> 150 </p> 151 </td> 152<td> 153 <p> 154 Bitmask type for flags that can be passed to send and receive operations. 155 </p> 156 </td> 157</tr> 158<tr> 159<td> 160 <p> 161 <a class="link" href="socket_base/out_of_band_inline.html" title="socket_base::out_of_band_inline"><span class="bold"><strong>out_of_band_inline</strong></span></a> 162 </p> 163 </td> 164<td> 165 <p> 166 Socket option for putting received out-of-band data inline. 167 </p> 168 </td> 169</tr> 170<tr> 171<td> 172 <p> 173 <a class="link" href="socket_base/receive_buffer_size.html" title="socket_base::receive_buffer_size"><span class="bold"><strong>receive_buffer_size</strong></span></a> 174 </p> 175 </td> 176<td> 177 <p> 178 Socket option for the receive buffer size of a socket. 179 </p> 180 </td> 181</tr> 182<tr> 183<td> 184 <p> 185 <a class="link" href="socket_base/receive_low_watermark.html" title="socket_base::receive_low_watermark"><span class="bold"><strong>receive_low_watermark</strong></span></a> 186 </p> 187 </td> 188<td> 189 <p> 190 Socket option for the receive low watermark. 191 </p> 192 </td> 193</tr> 194<tr> 195<td> 196 <p> 197 <a class="link" href="socket_base/reuse_address.html" title="socket_base::reuse_address"><span class="bold"><strong>reuse_address</strong></span></a> 198 </p> 199 </td> 200<td> 201 <p> 202 Socket option to allow the socket to be bound to an address that 203 is already in use. 204 </p> 205 </td> 206</tr> 207<tr> 208<td> 209 <p> 210 <a class="link" href="socket_base/send_buffer_size.html" title="socket_base::send_buffer_size"><span class="bold"><strong>send_buffer_size</strong></span></a> 211 </p> 212 </td> 213<td> 214 <p> 215 Socket option for the send buffer size of a socket. 216 </p> 217 </td> 218</tr> 219<tr> 220<td> 221 <p> 222 <a class="link" href="socket_base/send_low_watermark.html" title="socket_base::send_low_watermark"><span class="bold"><strong>send_low_watermark</strong></span></a> 223 </p> 224 </td> 225<td> 226 <p> 227 Socket option for the send low watermark. 228 </p> 229 </td> 230</tr> 231<tr> 232<td> 233 <p> 234 <a class="link" href="socket_base/shutdown_type.html" title="socket_base::shutdown_type"><span class="bold"><strong>shutdown_type</strong></span></a> 235 </p> 236 </td> 237<td> 238 <p> 239 Different ways a socket may be shutdown. 240 </p> 241 </td> 242</tr> 243<tr> 244<td> 245 <p> 246 <a class="link" href="socket_base/wait_type.html" title="socket_base::wait_type"><span class="bold"><strong>wait_type</strong></span></a> 247 </p> 248 </td> 249<td> 250 <p> 251 Wait types. 252 </p> 253 </td> 254</tr> 255</tbody> 256</table></div> 257<h5> 258<a name="boost_asio.reference.socket_base.h1"></a> 259 <span class="phrase"><a name="boost_asio.reference.socket_base.protected_member_functions"></a></span><a class="link" href="socket_base.html#boost_asio.reference.socket_base.protected_member_functions">Protected 260 Member Functions</a> 261 </h5> 262<div class="informaltable"><table class="table"> 263<colgroup> 264<col> 265<col> 266</colgroup> 267<thead><tr> 268<th> 269 <p> 270 Name 271 </p> 272 </th> 273<th> 274 <p> 275 Description 276 </p> 277 </th> 278</tr></thead> 279<tbody><tr> 280<td> 281 <p> 282 <a class="link" href="socket_base/_socket_base.html" title="socket_base::~socket_base"><span class="bold"><strong>~socket_base</strong></span></a> <span class="silver">[destructor]</span> 283 </p> 284 </td> 285<td> 286 <p> 287 Protected destructor to prevent deletion through this type. 288 </p> 289 </td> 290</tr></tbody> 291</table></div> 292<h5> 293<a name="boost_asio.reference.socket_base.h2"></a> 294 <span class="phrase"><a name="boost_asio.reference.socket_base.data_members"></a></span><a class="link" href="socket_base.html#boost_asio.reference.socket_base.data_members">Data 295 Members</a> 296 </h5> 297<div class="informaltable"><table class="table"> 298<colgroup> 299<col> 300<col> 301</colgroup> 302<thead><tr> 303<th> 304 <p> 305 Name 306 </p> 307 </th> 308<th> 309 <p> 310 Description 311 </p> 312 </th> 313</tr></thead> 314<tbody> 315<tr> 316<td> 317 <p> 318 <a class="link" href="socket_base/max_connections.html" title="socket_base::max_connections"><span class="bold"><strong>max_connections</strong></span></a> <span class="silver">[static]</span> 319 </p> 320 </td> 321<td> 322 <p> 323 (Deprecated: Use max_listen_connections.) The maximum length of 324 the queue of pending incoming connections. 325 </p> 326 </td> 327</tr> 328<tr> 329<td> 330 <p> 331 <a class="link" href="socket_base/max_listen_connections.html" title="socket_base::max_listen_connections"><span class="bold"><strong>max_listen_connections</strong></span></a> <span class="silver">[static]</span> 332 </p> 333 </td> 334<td> 335 <p> 336 The maximum length of the queue of pending incoming connections. 337 </p> 338 </td> 339</tr> 340<tr> 341<td> 342 <p> 343 <a class="link" href="socket_base/message_do_not_route.html" title="socket_base::message_do_not_route"><span class="bold"><strong>message_do_not_route</strong></span></a> <span class="silver">[static]</span> 344 </p> 345 </td> 346<td> 347 <p> 348 Specify that the data should not be subject to routing. 349 </p> 350 </td> 351</tr> 352<tr> 353<td> 354 <p> 355 <a class="link" href="socket_base/message_end_of_record.html" title="socket_base::message_end_of_record"><span class="bold"><strong>message_end_of_record</strong></span></a> <span class="silver">[static]</span> 356 </p> 357 </td> 358<td> 359 <p> 360 Specifies that the data marks the end of a record. 361 </p> 362 </td> 363</tr> 364<tr> 365<td> 366 <p> 367 <a class="link" href="socket_base/message_out_of_band.html" title="socket_base::message_out_of_band"><span class="bold"><strong>message_out_of_band</strong></span></a> <span class="silver">[static]</span> 368 </p> 369 </td> 370<td> 371 <p> 372 Process out-of-band data. 373 </p> 374 </td> 375</tr> 376<tr> 377<td> 378 <p> 379 <a class="link" href="socket_base/message_peek.html" title="socket_base::message_peek"><span class="bold"><strong>message_peek</strong></span></a> <span class="silver">[static]</span> 380 </p> 381 </td> 382<td> 383 <p> 384 Peek at incoming data without removing it from the input queue. 385 </p> 386 </td> 387</tr> 388</tbody> 389</table></div> 390<h5> 391<a name="boost_asio.reference.socket_base.h3"></a> 392 <span class="phrase"><a name="boost_asio.reference.socket_base.requirements"></a></span><a class="link" href="socket_base.html#boost_asio.reference.socket_base.requirements">Requirements</a> 393 </h5> 394<p> 395 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/socket_base.hpp</code> 396 </p> 397<p> 398 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 399 </p> 400</div> 401<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 402<td align="left"></td> 403<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 404 Kohlhoff<p> 405 Distributed under the Boost Software License, Version 1.0. (See accompanying 406 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>) 407 </p> 408</div></td> 409</tr></table> 410<hr> 411<div class="spirit-nav"> 412<a accesskey="p" href="signal_set.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="socket_base/broadcast.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 413</div> 414</body> 415</html> 416