Enum nix::sys::socket::InetAddr [−][src]
pub enum InetAddr { V4(sockaddr_in), V6(sockaddr_in6), }
Variants
V4(sockaddr_in)
V6(sockaddr_in6)
Implementations
impl InetAddr
[src]
impl InetAddr
[src]pub fn from_std(std: &SocketAddr) -> InetAddr
[src]
pub fn new(ip: IpAddr, port: u16) -> InetAddr
[src]
pub fn ip(&self) -> IpAddr
[src]
Gets the IP address associated with this socket address.
pub fn port(&self) -> u16
[src]
Gets the port number associated with this socket address