Trait ip::SocketAddrExt [] [src]

pub trait SocketAddrExt {
    fn new(ip: IpAddr, port: u16) -> SocketAddr;
    fn ip(&self) -> IpAddr;
}

Methods to convert between IpAddr and std::net::SocketAddr

Required Methods

Creates a new socket address from the (ip, port) pair.

Returns the IP address associated with this socket address.

Implementors