fn sockaddr_parse_with_port(
    addr: &str,
    default_port: u16,
) -> io::Result<vec::IntoIter<SocketAddr>> {
    match addr.to_socket_addrs() {
        // Try parsing again, with the default port.
        Err(_e) => (addr, default_port).to_socket_addrs(),
        Ok(addrs) => Ok(addrs),
    }
}
/// Parses a string into a SocketAddr allowing for the port to be missing.
Parses a string into a SocketAddr allowing for the port to be missing.
Parses a string into a SocketAddr allowing for the port to be missing .
fn sockaddr_parse_with_port(
    addr: &str,
    default_port: u16,
) -> io::Result<vec::IntoIter<SocketAddr>> {
    match addr.to_socket_addrs() {
        // Try parsing again, with the default port.
        Err(_e) => (addr, default_port).to_socket_addrs(),
        Ok(addrs) => Ok(addrs),
    }
}
fn sockaddr_parse_with_port ( addr : & str , default_port : u16 , ) -> io :: Result < vec :: IntoIter < SocketAddr > > { match addr . to_socket_addrs ( ) { // Try parsing again, with the default port. Err ( _e ) => ( addr , default_port ) . to_socket_addrs ( ) , Ok ( addrs ) => Ok ( addrs ) , } }
Parses a string into a SocketAddr allowing for the port to be missing.
Parses a string into a SocketAddr allowing for the port to be missing .
addr
&str
default_port
u16