1MONGOC_STREAM_READ(3)          MongoDB C Driver          MONGOC_STREAM_READ(3)
2
3
4

NAME

6       mongoc_stream_read - mongoc_stream_read()
7

SYNOPSIS

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

PARAMETERS

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

RETURNS

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

SEE ALSO

39       mongoc_stream_readv()
40
41       mongoc_stream_write()
42
43       mongoc_stream_writev()
44

AUTHOR

46       MongoDB, Inc
47
49       2017-present, MongoDB, Inc
50
51
52
53
541.15.2                           Nov 06, 2019            MONGOC_STREAM_READ(3)
Impressum