/// Creates a NodeAddr from an IP address and port
Creates a NodeAddr from an IP address and port
Creates a NodeAddr from an IP address and port
pub fn new(ip: IpAddr, port: u16) -> NodeAddr {
        NodeAddr {
            services: 0,
            ip: match ip {
                IpAddr::V4(ipv4) => ipv4.to_ipv6_mapped(),
                IpAddr::V6(ipv6) => ipv6,
            },
            port,
        }
    }
pub fn new ( ip : IpAddr , port : u16 ) -> NodeAddr { NodeAddr { services : 0 , ip : match ip { IpAddr :: V4 ( ipv4 ) => ipv4 . to_ipv6_mapped ( ) , IpAddr :: V6 ( ipv6 ) => ipv6 , } , port , } }
Creates a NodeAddr from an IP address and port
Creates a NodeAddr from an IP address and port
ip
IpAddr
port
u16