pub unsafe extern "C" fn ddsrt_getsockname(
sock: ddsrt_socket_t,
addr: *mut sockaddr,
addrlen: *mut socklen_t,
) -> dds_return_tExpand description
@brief Get the current address to which the socket is bound (@ref ddsrt_bind).
The ‘addrlen’ argument should be initialized to indicate the amount of space (in bytes) pointed to by ‘addr’. On return it contains the actual size of the socket address. The returned address is truncated if the buffer provided is too small; in this case, ‘addrlen’ will return a value greater than was supplied to the call.
@param[in] sock the socket @param[out] addr the address of the socket @param[in,out] addrlen specifies the size, in bytes, of the address structure pointed to by ‘addr’ @return a DDS_RETCODE (OK, ERROR, BAD_PARAMETER, OUT_OF_RESOURCES)