Function sockname
pub(in ::sys::net::connection::socket) unsafe fn sockname<F>(f: F) -> Result<SocketAddr>
where
F: FnOnce(*mut sockaddr, *mut socklen_t) -> c_int,
Wraps a call to a platform function that returns a socket address.
Safety
- if
freturns a success (i.e.cvtreturnsOkwhen called on the return value), the buffer provided tofmust have been initialized with a valid C socket address, the length of which must be written to the second argument.