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:SyncRandomAccessReadDevice Buffer-oriented synchronous random-access
9 read device requirements]
11 In the table below, `a` denotes a synchronous random-access read device object,
12 `o` denotes an offset of type `boost::uint64_t`, `mb` denotes an object
13 satisfying [link boost_asio.reference.MutableBufferSequence mutable buffer sequence]
14 requirements, and `ec` denotes an object of type `error_code`.
16 [table Buffer-oriented synchronous random-access read device requirements
17 [[operation] [type] [semantics, pre/post-conditions]]
19 [`a.read_some_at(o, mb);`]
24 size_t s = a.read_some_at(o, mb, ec);
25 if (ec) throw system_error(ec);
30 [`a.read_some_at(o, mb, ec);`]
33 Reads one or more bytes of data from the device `a` at offset `o`.\n
35 The mutable buffer sequence `mb` specifies memory where the data should
36 be placed. The `read_some_at` operation shall always fill a buffer in the
37 sequence completely before proceeding to the next.\n
39 If successful, returns the number of bytes read and sets `ec` such that
40 `!ec` is true. If an error occurred, returns `0` and sets `ec` such that
43 If the total size of all buffers in the sequence `mb` is `0`, the
44 function shall return `0` immediately.