pfamily

addrinfo.pfamily => integer Instance Public methods returns the protocol family as an integer. Addrinfo.tcp("localhost", 80).pfamily == Socket::PF_INET #=> true

listen

listen(backlog=Socket::SOMAXCONN) Instance Public methods creates a listening socket bound to self.

ipv6_v4mapped?

ipv6_v4mapped?() Instance Public methods Returns true for IPv4-mapped IPv6 address (::ffff:0:0/80). It returns false otherwise.

ipv6_v4compat?

ipv6_v4compat?() Instance Public methods Returns true for IPv4-compatible IPv6 address (::/80). It returns false otherwise.

ipv6_unspecified?

ipv6_unspecified?() Instance Public methods Returns true for IPv6 unspecified address (::). It returns false otherwise.

ipv6_unique_local?

ipv6_unique_local?() Instance Public methods Returns true for IPv6 unique local address (fc00::/7, RFC4193). It returns false otherwise.

ipv6_to_ipv4

ipv6_to_ipv4() Instance Public methods Returns IPv4 address of IPv4 mapped/compatible IPv6 address. It returns nil if self is not IPv4 mapped/compatible IPv6 address. Addrinfo.ip("::192.0.2.3").ipv6_to_ipv4 #=> #<Addrinfo: 192.0.2.3> Addrinfo.ip("::ffff:192.0.2.3").ipv6_to_ipv4 #=> #<Addrinfo: 192.0.2.3> Addrinfo.ip("::1").ipv6_to_ipv4 #=> nil Addrinfo.ip("192.0.2.3").ipv6_to_ipv4 #=> nil Addrinfo.unix("/tmp/sock").ipv6_to_ipv4

ipv6_sitelocal?

ipv6_sitelocal?() Instance Public methods Returns true for IPv6 site local address (ffc0::/10). It returns false otherwise.

ipv6_multicast?

ipv6_multicast?() Instance Public methods Returns true for IPv6 multicast address (ff00::/8). It returns false otherwise.

ipv6_mc_sitelocal?

ipv6_mc_sitelocal?() Instance Public methods Returns true for IPv6 multicast site-local scope address. It returns false otherwise.