pub fn tcp(addr: SocketAddr) -> Result<TcpListener>Expand description
Bind a TCP listener, making an IPv6 socket dual-stack so it also serves IPv4.
The returned listener is non-blocking, ready to be adopted by an async runtime
(tokio::net::TcpListener::from_std, axum_server::from_tcp).