• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>windows::basic_random_access_handle::write_some_at (1 of 2 overloads)</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="../write_some_at.html" title="windows::basic_random_access_handle::write_some_at">
9<link rel="prev" href="../write_some_at.html" title="windows::basic_random_access_handle::write_some_at">
10<link rel="next" href="overload2.html" title="windows::basic_random_access_handle::write_some_at (2 of 2 overloads)">
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="../write_some_at.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../write_some_at.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1"></a><a class="link" href="overload1.html" title="windows::basic_random_access_handle::write_some_at (1 of 2 overloads)">windows::basic_random_access_handle::write_some_at
28          (1 of 2 overloads)</a>
29</h5></div></div></div>
30<p>
31            Write some data to the handle at the specified offset.
32          </p>
33<pre class="programlisting">template&lt;
34    typename <a class="link" href="../../ConstBufferSequence.html" title="Constant buffer sequence requirements">ConstBufferSequence</a>&gt;
35std::size_t write_some_at(
36    uint64_t offset,
37    const ConstBufferSequence &amp; buffers);
38</pre>
39<p>
40            This function is used to write data to the random-access handle. The
41            function call will block until one or more bytes of the data has been
42            written successfully, or until an error occurs.
43          </p>
44<h6>
45<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.h0"></a>
46            <span class="phrase"><a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.parameters"></a></span><a class="link" href="overload1.html#boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.parameters">Parameters</a>
47          </h6>
48<div class="variablelist">
49<p class="title"><b></b></p>
50<dl class="variablelist">
51<dt><span class="term">offset</span></dt>
52<dd><p>
53                  The offset at which the data will be written.
54                </p></dd>
55<dt><span class="term">buffers</span></dt>
56<dd><p>
57                  One or more data buffers to be written to the handle.
58                </p></dd>
59</dl>
60</div>
61<h6>
62<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.h1"></a>
63            <span class="phrase"><a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.return_value">Return
64            Value</a>
65          </h6>
66<p>
67            The number of bytes written.
68          </p>
69<h6>
70<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.h2"></a>
71            <span class="phrase"><a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.exceptions"></a></span><a class="link" href="overload1.html#boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.exceptions">Exceptions</a>
72          </h6>
73<div class="variablelist">
74<p class="title"><b></b></p>
75<dl class="variablelist">
76<dt><span class="term">boost::system::system_error</span></dt>
77<dd><p>
78                  Thrown on failure. An error code of <code class="computeroutput">boost::asio::error::eof</code>
79                  indicates that the connection was closed by the peer.
80                </p></dd>
81</dl>
82</div>
83<h6>
84<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.h3"></a>
85            <span class="phrase"><a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.remarks"></a></span><a class="link" href="overload1.html#boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.remarks">Remarks</a>
86          </h6>
87<p>
88            The write_some_at operation may not write all of the data. Consider using
89            the <a class="link" href="../../write_at.html" title="write_at"><code class="computeroutput">write_at</code></a>
90            function if you need to ensure that all data is written before the blocking
91            operation completes.
92          </p>
93<h6>
94<a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.h4"></a>
95            <span class="phrase"><a name="boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.example"></a></span><a class="link" href="overload1.html#boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1.example">Example</a>
96          </h6>
97<p>
98            To write a single data buffer use the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput">buffer</code></a>
99            function as follows:
100          </p>
101<pre class="programlisting">handle.write_some_at(42, boost::asio::buffer(data, size));
102</pre>
103<p>
104            See the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput">buffer</code></a>
105            documentation for information on writing multiple buffers in one go,
106            and how to use it with arrays, boost::array or std::vector.
107          </p>
108</div>
109<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
110<td align="left"></td>
111<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
112      Kohlhoff<p>
113        Distributed under the Boost Software License, Version 1.0. (See accompanying
114        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>)
115      </p>
116</div></td>
117</tr></table>
118<hr>
119<div class="spirit-nav">
120<a accesskey="p" href="../write_some_at.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../write_some_at.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
121</div>
122</body>
123</html>
124