logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mongoc_socket_t *

Author

       MongoDB, Inc

Description

       Creates a new mongoc_socket_t structure. This calls socket() underneath to create a network socket.

Parameters

domain: An int containing the address family such as AF_INET.

       • type: An int containing the socket type such as SOCK_STREAM.

       • protocol: A protocol subset, typically 0.

Returns

       A  new  socket  if  successful,  otherwise  NULL  and  errno  is  set.  The  result  should be freed with
       mongoc_socket_destroy() when no longer in use.

Synopsis

          mongoc_socket_t *
          mongoc_socket_new (int domain,
                             int type,
                             int protocol);

See Also