mongoc_socket_new (int domain,
- An int containing the address family such as AF_INET.
- An int containing the socket type such as SOCK_STREAM.
- A protocol subset, typically 0.
Creates a new mongoc_socket_t structure. This calls socket(3) underneath to create a network socket.
A new socket if successful, otherwise NULL and errno is set. The result should be freed with mongoc_socket_destroy(3) when no longer in use.