MONGOC_STREAM_SOCKET_NEW(3)

✨ mongoc_stream_socket_new(3) β€” the socket-to-stream glow-up ✨

okay bestie, welcome to libmongoc, where we take a socket and wrap it in a stream like it's getting a whole new main character outfit. This page is mongoc_stream_socket_new(3), and the vibe is: one function, one socket, one new stream, and some ownership tea you need to sip. πŸ’…

🌸 SYNOPSIS 🌸

mongoc_stream_t *
mongoc_stream_socket_new (mongoc_socket_t *socket);

πŸŽ€ PARAMETERS πŸŽ€

  • socket β€” a mongoc_socket_t.

Creates a new mongoc_stream_socket_t using the mongoc_socket_t you provide. It's giving β€œhere's my socket, now make it a stream,” and the function absolutely ate. ✨

WARNING: This function transfers ownership of socket to the newly allocated stream. So bestie, once you hand it over, that socket is not yours to free anymore β€” no cap. 🫢

πŸ¦‹ RETURNS πŸ¦‹

A newly allocated mongoc_stream_socket_t that should be freed with mongoc_stream_destroy() when no longer in use. Like, when you're done with it, call destroy β€” don't just ghost it. 😭

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


That's the whole page, periodt. This libmongoc 2.5.6 manual page is dated Oct 09, 2026 β€” now go forth and stream responsibly. πŸŽ€πŸ’–

πŸ“¦ where this page comes from