End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Socket::Option#family
sockopt.family => integer
ext/socket/option.c
View on GitHub ↗
static VALUE
sockopt_family_m(VALUE self)
{
return rb_attr_get(self, rb_intern("family"));
}
returns the socket family as an integer.
Example
p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family #=> 10