• 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 write 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="AsyncRandomAccessReadDevice.html" title="Buffer-oriented asynchronous random-access read device requirements">
10<link rel="next" href="AsyncReadStream.html" title="Buffer-oriented asynchronous read stream 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="AsyncRandomAccessReadDevice.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="AsyncReadStream.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.AsyncRandomAccessWriteDevice"></a><a class="link" href="AsyncRandomAccessWriteDevice.html" title="Buffer-oriented asynchronous random-access write device requirements">Buffer-oriented
28      asynchronous random-access write device requirements</a>
29</h3></div></div></div>
30<p>
31        In the table below, <code class="computeroutput">a</code> denotes an asynchronous write stream object,
32        <code class="computeroutput">o</code> denotes an offset of type <code class="computeroutput">boost::uint64_t</code>, <code class="computeroutput">cb</code>
33        denotes an object satisfying <a class="link" href="ConstBufferSequence.html" title="Constant buffer sequence requirements">constant
34        buffer sequence</a> requirements, and <code class="computeroutput">h</code> denotes an object
35        satisfying <a class="link" href="WriteHandler.html" title="Write handler requirements">write handler</a>
36        requirements.
37      </p>
38<div class="table">
39<a name="boost_asio.reference.AsyncRandomAccessWriteDevice.t0"></a><p class="title"><b>Table 3. Buffer-oriented asynchronous random-access write device requirements</b></p>
40<div class="table-contents"><table class="table" summary="Buffer-oriented asynchronous random-access write 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_write_some_at(o, cb, 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 write one or more bytes
96                  of data to the device <code class="computeroutput">a</code> at 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 constant buffer
100                  sequence <code class="computeroutput">cb</code> specifies memory where the data to be
101                  written is located. The <code class="computeroutput">async_write_some_at</code> operation
102                  shall always write 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">cb</code> until such time as the write
105                  operation no longer requires access to the memory specified by
106                  the buffers in the sequence. The program must ensure the memory
107                  is valid until:<br> <br> — the last copy of <code class="computeroutput">cb</code> is
108                  destroyed, or<br> <br> — the handler for the asynchronous write
109                  operation is invoked,<br> <br> whichever comes first.<br>
110                  <br> If the total size of all buffers in the sequence <code class="computeroutput">cb</code>
111                  is <code class="computeroutput">0</code>, the asynchronous write operation shall complete
112                  immediately and pass <code class="computeroutput">0</code> as the argument to the handler
113                  that specifies the number of bytes written.
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="AsyncRandomAccessReadDevice.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="AsyncReadStream.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
134</div>
135</body>
136</html>
137