MONGOC_STREAM_WRITEV(3)

πŸ’… MONGOC_STREAM_WRITEV(3) πŸ’…

okay so this is the libmongoc manual page for MONGOC_STREAM_WRITEV(3), and it’s giving β€œwrite to a stream, but make it vectorized” energy ✨ bestie, let’s get into it.


✨ SYNOPSIS ✨

ssize_t
mongoc_stream_writev (mongoc_stream_t *stream,
                      mongoc_iovec_t *iov,
                      size_t iovcnt,
                      int32_t timeout_msec);

πŸŽ€ PARAMETERS πŸŽ€

  • stream β€” A mongoc_stream_t. The stream we’re writing into, lowkey the main character here πŸ’…
  • iov β€” A vector of mongoc_iovec_t. It’s the little lineup of things to write, fr fr.
  • iovcnt β€” The number of items in iov. Basically, how many entries in that vector are getting their moment 🌟
  • timeout_msec β€” The number of milliseconds to block before indicating failure, or 0 for non-blocking. Negative values indicate the default timeout. Yeah, negative is its own whole vibe πŸ‘€

The mongoc_stream_writev() function shall perform a write to a mongoc_stream_t. It’s modeled on the API and semantics of writev(), though the parameters map only loosely. So like… cousins, not twins 🫢

🚨 WARNING: The "default timeout" indicated by a negative value is both unspecified and unrelated to the documented default values for *TimeoutMS URI options. To specify a default timeout value for a *TimeoutMS URI option, use the MONGOC_DEFAULT_* constants defined in mongoc-client.h. No cap, this one matters πŸ’€

πŸ”₯ RETURNS πŸ”₯

The number of bytes written on success, or -1 upon failure and errno is set. That’s the whole return story, periodt ✨


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


xoxo, bestie 🫢 β€” this one’s from libmongoc 2.5.6, dated Oct 09, 2026 πŸ’–

πŸ“¦ where this page comes from