Function normalize_socket
Source pub fn normalize_socket(addr: SocketAddr) -> SocketAddr
Expand description
normalize for a socket address; the port is kept.
ยงExamples
let addr: std::net::SocketAddr = "[::ffff:10.0.0.1]:80".parse().unwrap();
assert_eq!(net_io::normalize_socket(addr).to_string(), "10.0.0.1:80");