DOKK / manpages / debian 13 / libbson-doc / bson_reader_new_from_handle.3.en
BSON_READER_NEW_FROM_HANDLE(3) libbson BSON_READER_NEW_FROM_HANDLE(3)

bson_reader_t *
bson_reader_new_from_handle (void *handle,

bson_reader_read_func_t rf,
bson_reader_destroy_func_t df);


  • handle: A user-provided pointer or NULL.
  • rf: A bson_reader_read_func_t.
  • df: A bson_reader_destroy_func_t.

This function allows for a pluggable data stream for the reader. This can be used to read from sockets, files, memory, or other arbitrary sources.

A newly allocated bson_reader_t if successful; otherwise NULL.

MongoDB, Inc

2009-present, MongoDB, Inc.

May 7, 2025 1.30.4