BSON_READER_READ_FUNC_T(3)

πŸ¦‹ BSON_READER_READ_FUNC_T(3) πŸ¦‹

okay so this is the libbson man page for BSON_READER_READ_FUNC_T(3), section 3, and it's a callback type bestie β€” not a whole program. Lowkey iconic. ✨


πŸ“œ SYNOPSIS πŸ“œ

          typedef ssize_t (*bson_reader_read_func_t) (void *handle,
                                                      void *buf,
                                                      size_t count);

πŸŽ€ PARAMETERS πŸŽ€

  • handle β€” the handle to read from, bestie.
  • buf β€” the buffer to read into.
  • count β€” the number of bytes to read. yes, literally that many πŸ’…

🌈 DESCRIPTION 🌈

This is a callback function that gets called by bson_reader_t to read the next chunk of data from the underlying opaque file descriptor. It's giving "read the next little snack of bytes" energy. πŸ“

This function is meant to operate similar to the read(2) function that's part of libc on UNIX-like systems. no cap, that's the whole vibe. πŸ’–


✨ RETURNS ✨

  • 0 for end of stream. 🏁
  • -1 for a failure on read. 😭
  • A value greater than zero for the number of bytes read into buf. πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” periodt. πŸ’œ


2009-present, MongoDB, Inc. β€” iconic legal text, no notes. 🫢


πŸ’– that's the whole page! source/version: libbson 2.5.6, date: Oct 09, 2026. bye bestie, go read some bytes and slay πŸ’…βœ¨

πŸ“¦ where this page comes from