mongoc_stream_write (3) - Linux Manuals
mongoc_stream_write: The mongoc_stream_write() function shall perform a write to a mongoc_stream_t. It's modeled on the API and semantics of write(), though the parameters map only loosely.
Command to display mongoc_stream_write
manual in Linux: $ man 3 mongoc_stream_write
NAME
mongoc_stream_write() - The mongoc_stream_write() function shall perform a write to a mongoc_stream_t. It's modeled on the API and semantics of write(), though the parameters map only loosely.
SYNOPSIS
ssize_t
mongoc_stream_write (mongoc_stream_t *stream,
void *buf,
size_t count,
int32_t timeout_msec);
PARAMETERS
- stream
-
A
mongoc_stream_t
\&.
- buf
-
The buffer to write.
- count
-
The number of bytes to write.
- timeout_msec
-
The number of milliseconds to wait before failure, a timeout of 0 will not block. If negative, use the default timeout.
The
mongoc_stream_write(3)
function shall perform a write to a
mongoc_stream_t
\&. It's modeled on the API and semantics of
write(3)
, though the parameters map only loosely.
RETURNS
The
mongoc_stream_write
function returns the number of bytes write on success. It returns
>= 0
and
< min_bytes
when end-of-file is encountered and
-1
on failure.
errno
is set upon failure.
COLOPHON
This page is part of MongoDB C Driver.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to mongoc_stream_write
- mongoc_stream_writev (3) - The mongoc_stream_writev() function shall perform a write
- mongoc_stream_buffered_new (3) - This function shall create a new mongoc_stream_t that buffers bytes to and from the underlying base_stream.
- mongoc_stream_buffered_t (3) - mongoc_stream_buffered_t should be considered a subclass of mongoc_stream_t. It performs buffering on an underlying stream.
- mongoc_stream_close (3) - This function shall close underlying file-descriptors of stream.
- mongoc_stream_cork (3) - This function shall prevent the writing of bytes to the underlying socket.
- mongoc_stream_destroy (3) - This function shall release all resources associated with a mongoc_stream_t, including freeing the structure. It is invalid to use stream after calling this function.
- mongoc_stream_file_get_fd (3) - This function shall return the underlying file-descriptor of a mongoc_stream_file_t.
- mongoc_stream_file_new (3) - Creates a new mongoc_stream_file_t using the file-descriptor provided.
- mongoc_stream_file_new_for_path (3) - This function shall create a new mongoc_stream_file_t after opening the underlying file with open() or the platform equivalent.
- mongoc_stream_file_t (3) - typedef struct _mongoc_stream_file_t mongoc_stream_file_t
- mongoc_stream_flush (3) - This function shall flush any buffered bytes in the underlying stream to the physical transport. It mimics the API and semantics of fflush(), forcing a write of user space buffered data.
- mongoc_stream_get_base_stream (3) - This function shall fetch the underlying stream for streams that wrap a base stream. Such implementations include mongoc_stream_buffered_t and mongoc_stream_tls_t.
- mongoc_stream_gridfs_new (3) - This function shall create a new mongoc_gridfs_file_t. This function does not transfer ownership of file. Therefore, file must remain valid for the lifetime of this stream.
- mongoc_stream_gridfs_t (3) - typedef struct _mongoc_stream_gridfs_t mongoc_stream_gridfs_t
- mongoc_stream_read (3) - The mongoc_stream_read() function shall perform a read from a mongoc_stream_t. It's modeled on the API and semantics of read(), though the parameters map only loosely.
- mongoc_stream_readv (3) - This function is identical to mongoc_stream_read() except that it takes a mongoc_iovec_t to perform gathered I/O.
- mongoc_stream_setsockopt (3) - This function is a wrapper around setsockopt() for streams that wrap sockets.
- mongoc_stream_socket_get_socket (3) - Retrieves the underlying mongoc_socket_t for a mongoc_stream_socket_t.