pub enum SocketAddr {
V4(SocketAddrV4),
V6(SocketAddrV6),
}Expand description
An internet socket address, either IPv4 or IPv6.
Internet socket addresses consist of an IP address, a 16-bit port number, as well
as possibly some version-dependent additional information. See SocketAddrV4’s and
SocketAddrV6’s respective documentation for more details.
The size of a SocketAddr instance may vary depending on the target operating
system.
§Examples