1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>posix::stream_descriptor</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="posix__descriptor_base/_descriptor_base.html" title="posix::descriptor_base::~descriptor_base"> 10<link rel="next" href="post.html" title="post"> 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="posix__descriptor_base/_descriptor_base.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="post.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.posix__stream_descriptor"></a><a class="link" href="posix__stream_descriptor.html" title="posix::stream_descriptor">posix::stream_descriptor</a> 28</h3></div></div></div> 29<p> 30 <a class="indexterm" name="boost_asio.indexterm.posix__stream_descriptor"></a> 31Typedef 32 for the typical usage of a stream-oriented descriptor. 33 </p> 34<pre class="programlisting">typedef basic_stream_descriptor stream_descriptor; 35</pre> 36<h5> 37<a name="boost_asio.reference.posix__stream_descriptor.h0"></a> 38 <span class="phrase"><a name="boost_asio.reference.posix__stream_descriptor.types"></a></span><a class="link" href="posix__stream_descriptor.html#boost_asio.reference.posix__stream_descriptor.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="posix__basic_stream_descriptor__rebind_executor.html" title="posix::basic_stream_descriptor::rebind_executor"><span class="bold"><strong>rebind_executor</strong></span></a> 62 </p> 63 </td> 64<td> 65 <p> 66 Rebinds the descriptor type to another executor. 67 </p> 68 </td> 69</tr> 70<tr> 71<td> 72 <p> 73 <a class="link" href="posix__basic_stream_descriptor/bytes_readable.html" title="posix::basic_stream_descriptor::bytes_readable"><span class="bold"><strong>bytes_readable</strong></span></a> 74 </p> 75 </td> 76<td> 77 <p> 78 IO control command to get the amount of data that can be read without 79 blocking. 80 </p> 81 </td> 82</tr> 83<tr> 84<td> 85 <p> 86 <a class="link" href="posix__basic_stream_descriptor/executor_type.html" title="posix::basic_stream_descriptor::executor_type"><span class="bold"><strong>executor_type</strong></span></a> 87 </p> 88 </td> 89<td> 90 <p> 91 The type of the executor associated with the object. 92 </p> 93 </td> 94</tr> 95<tr> 96<td> 97 <p> 98 <a class="link" href="posix__basic_stream_descriptor/lowest_layer_type.html" title="posix::basic_stream_descriptor::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a> 99 </p> 100 </td> 101<td> 102 <p> 103 A descriptor is always the lowest layer. 104 </p> 105 </td> 106</tr> 107<tr> 108<td> 109 <p> 110 <a class="link" href="posix__basic_stream_descriptor/native_handle_type.html" title="posix::basic_stream_descriptor::native_handle_type"><span class="bold"><strong>native_handle_type</strong></span></a> 111 </p> 112 </td> 113<td> 114 <p> 115 The native representation of a descriptor. 116 </p> 117 </td> 118</tr> 119<tr> 120<td> 121 <p> 122 <a class="link" href="posix__basic_stream_descriptor/wait_type.html" title="posix::basic_stream_descriptor::wait_type"><span class="bold"><strong>wait_type</strong></span></a> 123 </p> 124 </td> 125<td> 126 <p> 127 Wait types. 128 </p> 129 </td> 130</tr> 131</tbody> 132</table></div> 133<h5> 134<a name="boost_asio.reference.posix__stream_descriptor.h1"></a> 135 <span class="phrase"><a name="boost_asio.reference.posix__stream_descriptor.member_functions"></a></span><a class="link" href="posix__stream_descriptor.html#boost_asio.reference.posix__stream_descriptor.member_functions">Member 136 Functions</a> 137 </h5> 138<div class="informaltable"><table class="table"> 139<colgroup> 140<col> 141<col> 142</colgroup> 143<thead><tr> 144<th> 145 <p> 146 Name 147 </p> 148 </th> 149<th> 150 <p> 151 Description 152 </p> 153 </th> 154</tr></thead> 155<tbody> 156<tr> 157<td> 158 <p> 159 <a class="link" href="posix__basic_stream_descriptor/assign.html" title="posix::basic_stream_descriptor::assign"><span class="bold"><strong>assign</strong></span></a> 160 </p> 161 </td> 162<td> 163 <p> 164 Assign an existing native descriptor to the descriptor. 165 </p> 166 </td> 167</tr> 168<tr> 169<td> 170 <p> 171 <a class="link" href="posix__basic_stream_descriptor/async_read_some.html" title="posix::basic_stream_descriptor::async_read_some"><span class="bold"><strong>async_read_some</strong></span></a> 172 </p> 173 </td> 174<td> 175 <p> 176 Start an asynchronous read. 177 </p> 178 </td> 179</tr> 180<tr> 181<td> 182 <p> 183 <a class="link" href="posix__basic_stream_descriptor/async_wait.html" title="posix::basic_stream_descriptor::async_wait"><span class="bold"><strong>async_wait</strong></span></a> 184 </p> 185 </td> 186<td> 187 <p> 188 Asynchronously wait for the descriptor to become ready to read, 189 ready to write, or to have pending error conditions. 190 </p> 191 </td> 192</tr> 193<tr> 194<td> 195 <p> 196 <a class="link" href="posix__basic_stream_descriptor/async_write_some.html" title="posix::basic_stream_descriptor::async_write_some"><span class="bold"><strong>async_write_some</strong></span></a> 197 </p> 198 </td> 199<td> 200 <p> 201 Start an asynchronous write. 202 </p> 203 </td> 204</tr> 205<tr> 206<td> 207 <p> 208 <a class="link" href="posix__basic_stream_descriptor/basic_stream_descriptor.html" title="posix::basic_stream_descriptor::basic_stream_descriptor"><span class="bold"><strong>basic_stream_descriptor</strong></span></a> <span class="silver">[constructor]</span> 209 </p> 210 </td> 211<td> 212 <p> 213 Construct a stream descriptor without opening it. <br> <span class="silver"> —</span><br> 214 Construct a stream descriptor on an existing native descriptor. 215 <br> <span class="silver"> —</span><br> Move-construct a stream descriptor from another. 216 </p> 217 </td> 218</tr> 219<tr> 220<td> 221 <p> 222 <a class="link" href="posix__basic_stream_descriptor/cancel.html" title="posix::basic_stream_descriptor::cancel"><span class="bold"><strong>cancel</strong></span></a> 223 </p> 224 </td> 225<td> 226 <p> 227 Cancel all asynchronous operations associated with the descriptor. 228 </p> 229 </td> 230</tr> 231<tr> 232<td> 233 <p> 234 <a class="link" href="posix__basic_stream_descriptor/close.html" title="posix::basic_stream_descriptor::close"><span class="bold"><strong>close</strong></span></a> 235 </p> 236 </td> 237<td> 238 <p> 239 Close the descriptor. 240 </p> 241 </td> 242</tr> 243<tr> 244<td> 245 <p> 246 <a class="link" href="posix__basic_stream_descriptor/get_executor.html" title="posix::basic_stream_descriptor::get_executor"><span class="bold"><strong>get_executor</strong></span></a> 247 </p> 248 </td> 249<td> 250 <p> 251 Get the executor associated with the object. 252 </p> 253 </td> 254</tr> 255<tr> 256<td> 257 <p> 258 <a class="link" href="posix__basic_stream_descriptor/io_control.html" title="posix::basic_stream_descriptor::io_control"><span class="bold"><strong>io_control</strong></span></a> 259 </p> 260 </td> 261<td> 262 <p> 263 Perform an IO control command on the descriptor. 264 </p> 265 </td> 266</tr> 267<tr> 268<td> 269 <p> 270 <a class="link" href="posix__basic_stream_descriptor/is_open.html" title="posix::basic_stream_descriptor::is_open"><span class="bold"><strong>is_open</strong></span></a> 271 </p> 272 </td> 273<td> 274 <p> 275 Determine whether the descriptor is open. 276 </p> 277 </td> 278</tr> 279<tr> 280<td> 281 <p> 282 <a class="link" href="posix__basic_stream_descriptor/lowest_layer.html" title="posix::basic_stream_descriptor::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a> 283 </p> 284 </td> 285<td> 286 <p> 287 Get a reference to the lowest layer. <br> <span class="silver"> —</span><br> Get a const 288 reference to the lowest layer. 289 </p> 290 </td> 291</tr> 292<tr> 293<td> 294 <p> 295 <a class="link" href="posix__basic_stream_descriptor/native_handle.html" title="posix::basic_stream_descriptor::native_handle"><span class="bold"><strong>native_handle</strong></span></a> 296 </p> 297 </td> 298<td> 299 <p> 300 Get the native descriptor representation. 301 </p> 302 </td> 303</tr> 304<tr> 305<td> 306 <p> 307 <a class="link" href="posix__basic_stream_descriptor/native_non_blocking.html" title="posix::basic_stream_descriptor::native_non_blocking"><span class="bold"><strong>native_non_blocking</strong></span></a> 308 </p> 309 </td> 310<td> 311 <p> 312 Gets the non-blocking mode of the native descriptor implementation. 313 <br> <span class="silver"> —</span><br> Sets the non-blocking mode of the native descriptor 314 implementation. 315 </p> 316 </td> 317</tr> 318<tr> 319<td> 320 <p> 321 <a class="link" href="posix__basic_stream_descriptor/non_blocking.html" title="posix::basic_stream_descriptor::non_blocking"><span class="bold"><strong>non_blocking</strong></span></a> 322 </p> 323 </td> 324<td> 325 <p> 326 Gets the non-blocking mode of the descriptor. <br> <span class="silver"> —</span><br> Sets 327 the non-blocking mode of the descriptor. 328 </p> 329 </td> 330</tr> 331<tr> 332<td> 333 <p> 334 <a class="link" href="posix__basic_stream_descriptor/operator_eq_.html" title="posix::basic_stream_descriptor::operator="><span class="bold"><strong>operator=</strong></span></a> 335 </p> 336 </td> 337<td> 338 <p> 339 Move-assign a stream descriptor from another. 340 </p> 341 </td> 342</tr> 343<tr> 344<td> 345 <p> 346 <a class="link" href="posix__basic_stream_descriptor/read_some.html" title="posix::basic_stream_descriptor::read_some"><span class="bold"><strong>read_some</strong></span></a> 347 </p> 348 </td> 349<td> 350 <p> 351 Read some data from the descriptor. 352 </p> 353 </td> 354</tr> 355<tr> 356<td> 357 <p> 358 <a class="link" href="posix__basic_stream_descriptor/release.html" title="posix::basic_stream_descriptor::release"><span class="bold"><strong>release</strong></span></a> 359 </p> 360 </td> 361<td> 362 <p> 363 Release ownership of the native descriptor implementation. 364 </p> 365 </td> 366</tr> 367<tr> 368<td> 369 <p> 370 <a class="link" href="posix__basic_stream_descriptor/wait.html" title="posix::basic_stream_descriptor::wait"><span class="bold"><strong>wait</strong></span></a> 371 </p> 372 </td> 373<td> 374 <p> 375 Wait for the descriptor to become ready to read, ready to write, 376 or to have pending error conditions. 377 </p> 378 </td> 379</tr> 380<tr> 381<td> 382 <p> 383 <a class="link" href="posix__basic_stream_descriptor/write_some.html" title="posix::basic_stream_descriptor::write_some"><span class="bold"><strong>write_some</strong></span></a> 384 </p> 385 </td> 386<td> 387 <p> 388 Write some data to the descriptor. 389 </p> 390 </td> 391</tr> 392</tbody> 393</table></div> 394<p> 395 The <a class="link" href="posix__basic_stream_descriptor.html" title="posix::basic_stream_descriptor"><code class="computeroutput">posix::basic_stream_descriptor</code></a> 396 class template provides asynchronous and blocking stream-oriented descriptor 397 functionality. 398 </p> 399<h5> 400<a name="boost_asio.reference.posix__stream_descriptor.h2"></a> 401 <span class="phrase"><a name="boost_asio.reference.posix__stream_descriptor.thread_safety"></a></span><a class="link" href="posix__stream_descriptor.html#boost_asio.reference.posix__stream_descriptor.thread_safety">Thread 402 Safety</a> 403 </h5> 404<p> 405 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe. 406 </p> 407<p> 408 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe. 409 </p> 410<h5> 411<a name="boost_asio.reference.posix__stream_descriptor.h3"></a> 412 <span class="phrase"><a name="boost_asio.reference.posix__stream_descriptor.requirements"></a></span><a class="link" href="posix__stream_descriptor.html#boost_asio.reference.posix__stream_descriptor.requirements">Requirements</a> 413 </h5> 414<p> 415 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/posix/stream_descriptor.hpp</code> 416 </p> 417<p> 418 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 419 </p> 420</div> 421<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 422<td align="left"></td> 423<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 424 Kohlhoff<p> 425 Distributed under the Boost Software License, Version 1.0. (See accompanying 426 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>) 427 </p> 428</div></td> 429</tr></table> 430<hr> 431<div class="spirit-nav"> 432<a accesskey="p" href="posix__descriptor_base/_descriptor_base.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="post.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 433</div> 434</body> 435</html> 436