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

Author

       MongoDB, Inc

Description

       This  function  is  a  wrapper  around the BSD socket shutdown() and close() functions, and their Windows
       equivalents. The socket is shut down only if the current process is the same as the process  that  opened
       the socket. Regardless, the socket is then closed.

Parameters

socket: A mongoc_socket_t.

Returns

       0  on success, -1 on failure to close the socket. On failure, the socket's errno is set; retrieve it with
       mongoc_socket_errno().

Synopsis

          int
          mongoc_socket_close (mongoc_socket_t *socket);

See Also