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:AsyncRandomAccessReadDevice Buffer-oriented asynchronous random-access 9read device requirements] 10 11In the table below, `a` denotes an asynchronous random access read device 12object, `o` denotes an offset of type `boost::uint64_t`, `mb` denotes an object 13satisfying [link boost_asio.reference.MutableBufferSequence mutable buffer sequence] 14requirements, and `h` denotes an object satisfying [link 15boost_asio.reference.ReadHandler read handler] requirements. 16 17[table Buffer-oriented asynchronous random-access read device requirements 18 [[operation] [type] [semantics, pre/post-conditions]] 19 [ 20 [`a.get_executor()`] 21 [A type satisfying the [link boost_asio.reference.Executor1 Executor requirements].] 22 [Returns the associated I/O executor.] 23 ] 24 [ 25 [`a.async_read_some_at(o, mb, h);`] 26 [`void`] 27 [ 28 Initiates an asynchronous operation to read one or more bytes of data 29 from the device `a` at the offset `o`. The operation is performed via the 30 `io_service` object `a.get_io_service()` and behaves according to [link 31 boost_asio.reference.asynchronous_operations asynchronous operation] 32 requirements.[br] 33 [br] 34 The mutable buffer sequence `mb` specifies memory where the data should 35 be placed. The `async_read_some_at` operation shall always fill a buffer 36 in the sequence completely before proceeding to the next.[br] 37 [br] 38 The implementation shall maintain one or more copies of `mb` until such 39 time as the read operation no longer requires access to the memory 40 specified by the buffers in the sequence. The program must ensure the 41 memory is valid until:[br] 42 [br] 43 [mdash] the last copy of `mb` is destroyed, or[br] 44 [br] 45 [mdash] the handler for the asynchronous read operation is invoked,[br] 46 [br] 47 whichever comes first.[br] 48 [br] 49 If the total size of all buffers in the sequence `mb` is `0`, the 50 asynchronous read operation shall complete immediately and pass `0` as 51 the argument to the handler that specifies the number of bytes read. 52 ] 53 ] 54] 55 56[endsect] 57