Scroll to navigation

MONGOC_SOCKET_GETNAMEINFO(3) libmongoc MONGOC_SOCKET_GETNAMEINFO(3)

NAME

mongoc_socket_getnameinfo - mongoc_socket_getnameinfo()

SYNOPSIS

char *
mongoc_socket_getnameinfo (mongoc_socket_t *sock) BSON_GNUC_WARN_UNUSED_RESULT;


PARAMETERS

sock: A mongoc_socket_t.

DESCRIPTION

This is a helper around getting the local name of a socket. It is a wrapper around getpeername() and getnameinfo().

RETURNS

A newly allocated string that should be freed with bson_free().

AUTHOR

MongoDB, Inc

COPYRIGHT

2017-present, MongoDB, Inc

August 31, 2022 1.23.0