MONGOC_STREAM_CORK(3)

πŸ’… MONGOC_STREAM_CORK πŸ’…

okay bestie, welcome to the libmongoc corner of the group chat β€” this page is all about mongoc_stream_cork(), and she is giving β€œpause the write pipeline” energy. 🫢

πŸ”§ SYNOPSIS

int
mongoc_stream_cork (mongoc_stream_t *stream);

πŸŽ€ PARAMETERS

  • stream β€” a mongoc_stream_t. That’s the stream, bestie β€” the one and only. πŸ’–

This function shall prevent the writing of bytes to the underlying socket. Lowkey it’s the β€œhold up, don’t send that yet” of stream calls. 😌

⚠️ NOTE: not all streams implement this function. Buffering generally works better. No cap β€” this is important. πŸ’€

πŸ” RETURNS

  • 0 on success.
  • -1 on failure, and errno is set.

So like: 0 = slay, -1 = something went off and errno is spilling the tea. ✨

πŸ‘€ SEE ALSO

  • mongoc_stream_buffered_new() β€” go peek at this one too.
  • mongoc_stream_uncork() β€” the un-corking counterpart, obviously. πŸ“

πŸ‘‘ AUTHOR

MongoDB, Inc β€” iconic, tbh. πŸ‘‘

2009-present, MongoDB, Inc. β€” periodt. πŸŽ€


That’s the whole vibe check, bestie β€” libmongoc version 2.5.6, dated Oct 09, 2026. Catch you in the next man page! πŸ’…πŸ’–

πŸ“¦ where this page comes from