Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2977

mongoc_stream_initiator_t is not documented

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: docs
    • Labels:
      None

      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?

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: