MONGOC_STREAM_WRITE(3)
π MONGOC_STREAM_WRITE(3) β¨
okay so bestie, this is a libmongoc page, and honestly it's a short one but it's important, so let's get into it π«Ά
πΈ SYNOPSIS πΈ
like, here's the whole vibe, literally copy this exactly:
ssize_t
mongoc_stream_write (mongoc_stream_t *stream,
void *buf,
size_t count,
int32_t timeout_msec);
π PARAMETERS π
streamβ amongoc_stream_t. that's the thing you're writing into, bestie πbufβ the buffer to write. this is where your bytes are living rn.countβ the number of bytes to write. how many, diva.timeout_msecβ the number of milliseconds to wait before failure. and listen: a timeout of0will not block (iconic, zero patience energy). if it's negative, use the default timeout.
so basically 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 β like, they're cousins, not twins, iykyk π
β οΈ WARNING bestie, read this: the "default timeout" indicated by a negative value is both unspecified and unrelated to the documented default values for*TimeoutMSURI options. so do not go assuming things. to specify a default timeout value for a*TimeoutMSURI option, use theMONGOC_DEFAULT_*constants defined inmongoc-client.h. periodt π
β RETURNS β
the mongoc_stream_write() function returns the number of bytes written on success. it returns -1 and sets errno upon failure. no cap, that's it π₯
SEE ALSO:
mongoc_stream_read()mongoc_stream_readv()mongoc_stream_writev()
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, bestie, you ate π this one's from version 2.5.6, dated Oct 09, 2026 β mwah, go write some bytes ππ§
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms