1MONGOC_STREAM_READ(3)              libmongoc             MONGOC_STREAM_READ(3)
2
3
4

SYNOPSIS

6          ssize_t
7          mongoc_stream_read (mongoc_stream_t *stream,
8                              void *buf,
9                              size_t count,
10                              size_t min_bytes,
11                              int32_t timeout_msec);
12

PARAMETERS

14stream: A mongoc_stream_t.
15
16buf: The buffer to read into.
17
18count: The number of bytes to read.
19
20min_bytes:  The  minimum  number  of  bytes to read, or else indicate
21         failure.
22
23timeout_msec: The number of milliseconds to wait  before  failure,  a
24         timeout of 0 will not block. If negative, use the default timeout.
25
26       The   mongoc_stream_read()   function  shall  perform  a  read  from  a
27       mongoc_stream_t. It's modeled on  the  API  and  semantics  of  read(),
28       though the parameters map only loosely.
29

RETURNS

31       The  mongoc_stream_read()  function returns the number of bytes read on
32       success. It returns >= 0 and < min_bytes when  end-of-file  is  encoun‐
33       tered and -1 on failure. errno is set upon failure.
34
35       SEE ALSO:
36          mongoc_stream_readv()
37
38          mongoc_stream_write()
39
40          mongoc_stream_writev()
41
42

AUTHOR

44       MongoDB, Inc
45
47       2017-present, MongoDB, Inc
48
49
50
51
521.25.1                           Nov 08, 2023            MONGOC_STREAM_READ(3)
Impressum