2 / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
8 [section:SyncRandomAccessWriteDevice Buffer-oriented synchronous random-access
9 write device requirements]
11 In the table below, `a` denotes a synchronous random-access write device
12 object, `o` denotes an offset of type `boost::uint64_t`, `cb` denotes an object
13 satisfying [link boost_asio.reference.ConstBufferSequence constant buffer sequence]
14 requirements, and `ec` denotes an object of type `error_code`.
16 [table Buffer-oriented synchronous random-access write device requirements
17 [[operation] [type] [semantics, pre/post-conditions]]
19 [`a.write_some_at(o, cb);`]
24 size_t s = a.write_some(o, cb, ec);
25 if (ec) throw system_error(ec);
30 [`a.write_some_at(o, cb, ec);`]
33 Writes one or more bytes of data to the device `a` at offset `o`.\n
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.\n
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.\n
43 If the total size of all buffers in the sequence `cb` is `0`, the
44 function shall return `0` immediately.