• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Requirements on read and write operations</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="asynchronous_operations.html" title="Requirements on asynchronous operations">
10<link rel="next" href="synchronous_socket_operations.html" title="Requirements on synchronous socket operations">
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="asynchronous_operations.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="synchronous_socket_operations.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.read_write_operations"></a><a class="link" href="read_write_operations.html" title="Requirements on read and write operations">Requirements
28      on read and write operations</a>
29</h3></div></div></div>
30<p>
31        A <span class="emphasis"><em>read operation</em></span> is an operation that reads data into
32        a mutable buffer sequence argument of a type meeting <a class="link" href="MutableBufferSequence.html" title="Mutable buffer sequence requirements"><code class="computeroutput">MutableBufferSequence</code></a>
33        requirements. The mutable buffer sequence specifies memory where the data
34        should be placed. A read operation shall always fill a buffer in the sequence
35        completely before proceeding to the next.
36      </p>
37<p>
38        A <span class="emphasis"><em>write operation</em></span> is an operation that writes data from
39        a constant buffer sequence argument of a type meeting <a class="link" href="ConstBufferSequence.html" title="Constant buffer sequence requirements"><code class="computeroutput">ConstBufferSequence</code></a>
40        requirements. The constant buffer sequence specifies memory where the data
41        to be written is located. A write operation shall always write a buffer in
42        the sequence completely before proceeding to the next.
43      </p>
44<p>
45        If a read or write operation is also an <a class="link" href="asynchronous_operations.html" title="Requirements on asynchronous operations">asynchronous
46        operation</a>, the operation shall maintain one or more copies of the
47        buffer sequence until such time as the operation no longer requires access
48        to the memory specified by the buffers in the sequence. The program shall
49        ensure the memory remains valid until:
50      </p>
51<p>
52        — the last copy of the buffer sequence is destroyed, or
53      </p>
54<p>
55        — the completion handler for the asynchronous operation is invoked,
56      </p>
57<p>
58        whichever comes first.
59      </p>
60</div>
61<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
62<td align="left"></td>
63<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
64      Kohlhoff<p>
65        Distributed under the Boost Software License, Version 1.0. (See accompanying
66        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>)
67      </p>
68</div></td>
69</tr></table>
70<hr>
71<div class="spirit-nav">
72<a accesskey="p" href="asynchronous_operations.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="synchronous_socket_operations.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
73</div>
74</body>
75</html>
76