• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Buffer-oriented asynchronous random-access read device requirements</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="AcceptHandler.html" title="Accept handler requirements">
10<link rel="next" href="AsyncRandomAccessWriteDevice.html" title="Buffer-oriented asynchronous random-access write device requirements">
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="AcceptHandler.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="AsyncRandomAccessWriteDevice.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.AsyncRandomAccessReadDevice"></a><a class="link" href="AsyncRandomAccessReadDevice.html" title="Buffer-oriented asynchronous random-access read device requirements">Buffer-oriented
28      asynchronous random-access read device requirements</a>
29</h3></div></div></div>
30<p>
31        In the table below, <code class="computeroutput">a</code> denotes an asynchronous random access
32        read device object, <code class="computeroutput">o</code> denotes an offset of type <code class="computeroutput">boost::uint64_t</code>,
33        <code class="computeroutput">mb</code> denotes an object satisfying <a class="link" href="MutableBufferSequence.html" title="Mutable buffer sequence requirements">mutable
34        buffer sequence</a> requirements, and <code class="computeroutput">h</code> denotes an object
35        satisfying <a class="link" href="ReadHandler.html" title="Read handler requirements">read handler</a>
36        requirements.
37      </p>
38<div class="table">
39<a name="boost_asio.reference.AsyncRandomAccessReadDevice.t0"></a><p class="title"><b>Table 2. Buffer-oriented asynchronous random-access read device requirements</b></p>
40<div class="table-contents"><table class="table" summary="Buffer-oriented asynchronous random-access read device requirements">
41<colgroup>
42<col>
43<col>
44<col>
45</colgroup>
46<thead><tr>
47<th>
48                <p>
49                  operation
50                </p>
51              </th>
52<th>
53                <p>
54                  type
55                </p>
56              </th>
57<th>
58                <p>
59                  semantics, pre/post-conditions
60                </p>
61              </th>
62</tr></thead>
63<tbody>
64<tr>
65<td>
66                <p>
67                  <code class="computeroutput">a.get_executor()</code>
68                </p>
69              </td>
70<td>
71                <p>
72                  A type satisfying the <a class="link" href="Executor1.html" title="Executor requirements">Executor
73                  requirements</a>.
74                </p>
75              </td>
76<td>
77                <p>
78                  Returns the associated I/O executor.
79                </p>
80              </td>
81</tr>
82<tr>
83<td>
84                <p>
85                  <code class="computeroutput">a.async_read_some_at(o, mb, h);</code>
86                </p>
87              </td>
88<td>
89                <p>
90                  <code class="computeroutput">void</code>
91                </p>
92              </td>
93<td>
94                <p>
95                  Initiates an asynchronous operation to read one or more bytes of
96                  data from the device <code class="computeroutput">a</code> at the offset <code class="computeroutput">o</code>.
97                  The operation is performed via the <code class="computeroutput">io_service</code> object
98                  <code class="computeroutput">a.get_io_service()</code> and behaves according to <a class="link" href="asynchronous_operations.html" title="Requirements on asynchronous operations">asynchronous
99                  operation</a> requirements.<br> <br> The mutable buffer
100                  sequence <code class="computeroutput">mb</code> specifies memory where the data should
101                  be placed. The <code class="computeroutput">async_read_some_at</code> operation shall
102                  always fill a buffer in the sequence completely before proceeding
103                  to the next.<br> <br> The implementation shall maintain one
104                  or more copies of <code class="computeroutput">mb</code> until such time as the read operation
105                  no longer requires access to the memory specified by the buffers
106                  in the sequence. The program must ensure the memory is valid until:<br>
107                  <br> — the last copy of <code class="computeroutput">mb</code> is destroyed, or<br>
108                  <br> — the handler for the asynchronous read operation is invoked,<br>
109                  <br> whichever comes first.<br> <br> If the total size of
110                  all buffers in the sequence <code class="computeroutput">mb</code> is <code class="computeroutput">0</code>,
111                  the asynchronous read operation shall complete immediately and
112                  pass <code class="computeroutput">0</code> as the argument to the handler that specifies
113                  the number of bytes read.
114                </p>
115              </td>
116</tr>
117</tbody>
118</table></div>
119</div>
120<br class="table-break">
121</div>
122<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
123<td align="left"></td>
124<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
125      Kohlhoff<p>
126        Distributed under the Boost Software License, Version 1.0. (See accompanying
127        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>)
128      </p>
129</div></td>
130</tr></table>
131<hr>
132<div class="spirit-nav">
133<a accesskey="p" href="AcceptHandler.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="AsyncRandomAccessWriteDevice.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
134</div>
135</body>
136</html>
137