1[/
2 / Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
3 /
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 /]
7
8[section:SyncRandomAccessWriteDevice Buffer-oriented synchronous random-access
9write device requirements]
10
11In the table below, `a` denotes a synchronous random-access write device
12object, `o` denotes an offset of type `boost::uint64_t`, `cb` denotes an object
13satisfying [link boost_asio.reference.ConstBufferSequence constant buffer sequence]
14requirements, and `ec` denotes an object of type `error_code`.
15
16[table Buffer-oriented synchronous random-access write device requirements
17  [[operation] [type] [semantics, pre/post-conditions]]
18  [
19    [`a.write_some_at(o, cb);`]
20    [`size_t`]
21    [Equivalent to:
22     ``
23       error_code ec;
24       size_t s = a.write_some(o, cb, ec);
25       if (ec) throw system_error(ec);
26       return s;
27     ``]
28  ]
29  [
30    [`a.write_some_at(o, cb, ec);`]
31    [`size_t`]
32    [
33      Writes one or more bytes of data to the device `a` at offset `o`.[br]
34      [br]
35      The constant buffer sequence `cb` specifies memory where the data to be
36      written is located. The `write_some_at` operation shall always write a
37      buffer in the sequence completely before proceeding to the next.[br]
38      [br]
39      If successful, returns the number of bytes written and sets `ec` such
40      that `!ec` is true. If an error occurred, returns `0` and sets `ec` such
41      that `!!ec` is true.[br]
42      [br]
43      If the total size of all buffers in the sequence `cb` is `0`, the
44      function shall return `0` immediately.
45    ]
46  ]
47]
48
49[endsect]
50