Struct std::net::SocketAddrV4
[−]
[src]
pub struct SocketAddrV4 { // some fields omitted }
An IPv4 socket address which is a (ip, port) combination.
Methods
impl SocketAddrV4
fn new(ip: Ipv4Addr, port: u16) -> SocketAddrV4
Creates a new socket address from the (ip, port) pair.
fn ip(&self) -> &Ipv4Addr
Returns the IP address associated with this socket address.
fn port(&self) -> u16
Returns the port number associated with this socket address.