pub(crate) unsafe fn to_socket_addr(
storage: *const sockaddr_storage,
) -> Result<SocketAddr>
Expand description
Converts a libc::sockaddr
compatible struct into a native Rust SocketAddr
.
§Safety
storage
must have the ss_family
field correctly initialized.
storage
must be initialised to a sockaddr_in
or sockaddr_in6
.