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)


118
119
120
121
122
# File 'option.c', line 118

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