SYNOPSIS
ssize_t mongoc_stream_writev (mongoc_stream_t *stream, mongoc_iovec_t *iov, size_t iovcnt, int32_t timeout_msec);
DESCRIPTION
The mongoc_stream_writev() function shall perform a write to a mongoc_stream(7). It’s modeled on the API and semantics of writev(2), though the parameters map only loosely.
- iov
-
An array of mongoc_iovec_t *. These are the same as those used in writev(2).
- iovcnt
-
The number of iov’s in iov.
- timeout_msec
-
The timeout, in milliseconds, to attempt to fully write iov. If negative, use the default timeout. A timeout of 0 implies a non-blocking write.
All stream implementations implement writev().
RETURN VALUE
The mongoc_stream_writev() function returns the number of bytes written on success and -1 on failure.
ERRORS
errno may be set by the underlying transport.
There are also mongoc_stream_writev() specific errors:
- ETIMEDOUT
-
iov could not be written in timeout_msec.
SEE ALSO
AUTHORS
This page was written by MongoDB Inc.