[CDRIVER-2977] mongoc_stream_initiator_t is not documented Created: 21/Feb/19  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: docs
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The documentation for mongoc_client_set_stream_initiator() links to mongoc_client_t for both the client and initiator arguments. I would have expected initiator to link for some documentation of mongoc_stream_initiator_t, which is apparently just a typedef-ed function signature from mongoc-client.h:

/**
 * mongoc_stream_initiator_t:
 * @uri: The uri and options for the stream.
 * @host: The host and port (or UNIX domain socket path) to connect to.
 * @user_data: The pointer passed to mongoc_client_set_stream_initiator.
 * @error: A location for an error.
 *
 * Creates a new mongoc_stream_t for the host and port. Begin a
 * non-blocking connect and return immediately.
 *
 * This can be used by language bindings to create network transports other
 * than those built into libmongoc. An example of such would be the streams
 * API provided by PHP.
 *
 * Returns: A newly allocated mongoc_stream_t or NULL on failure.
 */
typedef mongoc_stream_t *(*mongoc_stream_initiator_t) (
   const mongoc_uri_t *uri,
   const mongoc_host_list_t *host,
   void *user_data,
   bson_error_t *error);

I imagine this doesn't deserve it's own page, but I don't believe any of the sections on the mongoc_client_t page discuss this. Perhaps it should be mentioned under that page's Streams section, and the link updated to point to that heading?


Generated at Wed Feb 07 21:16:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.