flix

0.79.0

SocketAddr

Type of socket addresses, and its functions.

enum SocketAddr with EqSource
case V4(SocketAddrV4)
case V6(SocketAddrV6)

Type of socket addresses.

A socket address is either an IPv4 or an IPv6 socket address.

Instances

Eq, Formattable, FromString, ToString

Definitions

def fromString(x: String): Option[SocketAddr]§ Source

Attempts to parse the given String x as a SocketAddr.

Returns Some(socket) if the string was successfully parsed. Otherwise returns None.

def ip(s: SocketAddr): IpAddr§ Source

Return the IpAddr of the SocketAddr s.

def port(s: SocketAddr): Int32§ Source

Return the port of the SocketAddr s.