1MONGOC_STREAM_READ(3)              libmongoc             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

17stream: A mongoc_stream_t.
18
19buf: The buffer to read into.
20
21count: The number of bytes to read.
22
23min_bytes:  The  minimum  number  of  bytes to read, or else indicate
24         failure.
25
26timeout_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
38       SEE ALSO:
39          mongoc_stream_readv()
40
41          mongoc_stream_write()
42
43          mongoc_stream_writev()
44
45

AUTHOR

47       MongoDB, Inc
48
50       2017-present, MongoDB, Inc
51
52
53
54
551.21.1                           Mar 02, 2022            MONGOC_STREAM_READ(3)
Impressum