Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Addrinfo#ipv6_v4compat?
() -> bool
ipv6_v4compat?
ext/socket/raddrinfo.c
View on GitHub ↗
static VALUE
addrinfo_ipv6_v4compat_p(VALUE self)
{
struct in6_addr *addr = extract_in6_addr(self);
if (addr && IN6_IS_ADDR_V4COMPAT(addr)) return Qtrue;
return Qfalse;
}
Returns true for IPv4-compatible IPv6 address (::/80). It returns false otherwise.
See also
#ipv6_unspecified?
#ipv6_v4mapped?
#ipv6_unique_local?
#listen
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0