File: AsyncReadStream.qbk

package info (click to toggle)
boost1.88 1.88.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 576,932 kB
  • sloc: cpp: 4,149,234; xml: 136,789; ansic: 35,092; python: 33,910; asm: 5,698; sh: 4,604; ada: 1,681; makefile: 1,633; pascal: 1,139; perl: 1,124; sql: 640; yacc: 478; ruby: 271; java: 77; lisp: 24; csh: 6
file content (50 lines) | stat: -rw-r--r-- 2,043 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[/
 / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 /
 / Distributed under the Boost Software License, Version 1.0. (See accompanying
 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 /]

[section:AsyncReadStream Buffer-oriented asynchronous read stream requirements]

A type `X` meets the `AsyncReadStream` requirements if it satisfies the
requirements listed below.

In the table below, `a` denotes a value of type `X`, `mb` denotes a (possibly
const) value satisfying the [link boost_asio.reference.MutableBufferSequence
`MutableBufferSequence`] requirements, and `t` is a completion token.

[table AsyncReadStream requirements
  [[operation] [type] [semantics, pre/post-conditions]]
  [
    [`a.get_executor()`]
    [A type satisfying the [link boost_asio.reference.Executor1 Executor requirements].]
    [Returns the associated I/O executor.]
  ]
  [
    [`a.async_read_some(mb,t)`]
    [
      The return type is determined according to the requirements for an
      [link boost_asio.reference.asynchronous_operations asynchronous operation].
    ]
    [
      Meets the requirements for a [link boost_asio.reference.read_write_operations
      read operation] and an [link boost_asio.reference.asynchronous_operations
      asynchronous operation] with completion signature `void(error_code ec,
      size_t n)`.[br]
      [br]
      If `buffer_size(mb) > 0`, initiates an asynchronous operation to read one
      or more bytes of data from the stream `a` into the buffer sequence `mb`.
      If successful, `ec` is set such that `!ec` is `true`, and `n` is the
      number of bytes read. If an error occurred, `ec` is set such that `!!ec`
      is `true`, and `n` is 0. If all data has been read from the stream, and
      the stream performed an orderly shutdown, `ec` is
      `stream_errc::eof` and `n` is 0.[br]
      [br]
      If `buffer_size(mb) == 0`, the operation completes immediately. `ec` is
      set such that `!ec` is `true`, and `n` is 0.
    ]
  ]
]

[endsect]