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:SyncReadStream Buffer-oriented synchronous read stream requirements]
10 In the table below, `a` denotes a synchronous read stream object, `mb` denotes
11 an object satisfying [link boost_asio.reference.MutableBufferSequence
12 mutable buffer sequence] requirements, and `ec` denotes an object of type
15 [table Buffer-oriented synchronous read stream requirements
16 [[operation] [type] [semantics, pre/post-conditions]]
23 size_t s = a.read_some(mb, ec);
24 if (ec) throw system_error(ec);
29 [`a.read_some(mb, ec);`]
32 Reads one or more bytes of data from the stream `a`.\n
34 The mutable buffer sequence `mb` specifies memory where the data should
35 be placed. The `read_some` operation shall always fill a buffer in the
36 sequence completely before proceeding to the next.\n
38 If successful, returns the number of bytes read and sets `ec` such that
39 `!ec` is true. If an error occurred, returns `0` and sets `ec` such that
42 If the total size of all buffers in the sequence `mb` is `0`, the
43 function shall return `0` immediately.