Method: Socket::Option#family

Defined in:
option.c

#familyInteger

returns the socket family as an integer.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family
#=> 10

Returns:

  • (Integer)


124
125
126
127
128
# File 'option.c', line 124

static VALUE
sockopt_family_m(VALUE self)
{
    return rb_attr_get(self, rb_intern("family"));
}