1MONGOC_STREAM_READ(3) libmongoc MONGOC_STREAM_READ(3)
2
3
4
6 mongoc_stream_read - mongoc_stream_read()
7
9 ssize_t
10 mongoc_stream_read (mongoc_stream_t *stream,
11 void *buf,
12 size_t count,
13 size_t min_bytes,
14 int32_t timeout_msec);
15
17 · stream: A mongoc_stream_t.
18
19 · buf: The buffer to read into.
20
21 · count: The number of bytes to read.
22
23 · min_bytes: The minimum number of bytes to read, or else indicate
24 failure.
25
26 · timeout_msec: The number of milliseconds to wait before failure, a
27 timeout of 0 will not block. If negative, use the default timeout.
28
29 The mongoc_stream_read() function shall perform a read from a mon‐
30 goc_stream_t. It's modeled on the API and semantics of read(), though
31 the parameters map only loosely.
32
34 The mongoc_stream_read function returns the number of bytes read on
35 success. It returns >= 0 and < min_bytes when end-of-file is encoun‐
36 tered and -1 on failure. errno is set upon failure.
37
39 mongoc_stream_readv()
40
41 mongoc_stream_write()
42
43 mongoc_stream_writev()
44
46 MongoDB, Inc
47
49 2017-present, MongoDB, Inc
50
51
52
53
541.16.2 Feb 25, 2020 MONGOC_STREAM_READ(3)