MONGOC_STREAM_FLUSH(3)

πŸ’… MONGOC_STREAM_FLUSH(3)

okay so this is a page from the libmongoc manual, bestie β€” yes the whole libmongoc situation β€” and today's main character is mongoc_stream_flush. it's giving "small function, big job" energy fr fr ✨


🌊 SYNOPSIS

int
mongoc_stream_flush (mongoc_stream_t *stream);

that's it. that's the whole vibe. one function, one pointer, one int coming back at you 🫢


πŸŽ€ PARAMETERS

  • stream β€” a mongoc_stream_t. that's the stream you're flushing, obviously πŸ’β€β™€οΈ

so here's the tea: this function shall flush any buffered bytes in the underlying stream to the physical transport. it literally mimics the API and the semantics of fflush(), forcing a write of user space buffered data. no cap β€” it's the same idea, just living in mongoc land.

⚠️ heads up though: not all stream implementations may implement this feature. so like… vibe check your stream first, bestie. some of them just don't have the range 😭

⭐ RETURNS

  • 0 β€” success, slay, we ate πŸ’…
  • -1 β€” it did not slay, and errno is set. check errno for the details, iykyk πŸ¦‹

πŸ‘‘ AUTHOR

MongoDB, Inc β€” the icons behind all of this πŸŽ€


2009-present, MongoDB, Inc. β€” that's the whole copyright line, keep it safe, protect it at all costs πŸ’–


okay that's the whole page, honestly iconic of you for reading to the end 🧚 this was version 2.5.6, dated Oct 09, 2026 β€” yes, 2026, don't ask, time is a construct πŸ’€ catch you in the next manpage, mwah πŸ“πŸ’œ

πŸ“¦ where this page comes from