pub fn normalize_socket_addr(addr: SocketAddr) -> SocketAddrExpand description
Normalize a socket address by converting IPv4-mapped IPv6 addresses to pure IPv4.
This is critical for address comparison when connections may use either format.
For example, [::ffff:192.168.1.1]:9000 normalizes to 192.168.1.1:9000.
This normalization is essential for nodes bound to IPv4-only sockets (0.0.0.0:port) that receive addresses in IPv4-mapped IPv6 format (::ffff:a.b.c.d). Without normalization, attempting to connect to an IPv4-mapped address from an IPv4-only socket fails with “Address family not supported by protocol” (EAFNOSUPPORT).