Server::new_tcp_server / Server::new_tls_server currently accept only a SocketAddr. It will be good to have an option to bind the listening socket to a specific network interface — you can pick an IP, but that breaks down when the interface's address is assigned dynamically (DHCP, PPP, cellular links) or when several interfaces share an address range.
tokio has a bind_device(https://docs.rs/tokio/latest/tokio/net/struct.TcpSocket.html#method.bind_device) API for this. Will it be possible to add this option
Server::new_tcp_server / Server::new_tls_server currently accept only a SocketAddr. It will be good to have an option to bind the listening socket to a specific network interface — you can pick an IP, but that breaks down when the interface's address is assigned dynamically (DHCP, PPP, cellular links) or when several interfaces share an address range.
tokio has a
bind_device(https://docs.rs/tokio/latest/tokio/net/struct.TcpSocket.html#method.bind_device) API for this. Will it be possible to add this option