Method: Addrinfo#pfamily

Defined in:
raddrinfo.c

#pfamilyInteger

returns the protocol family as an integer.

Addrinfo.tcp("localhost", 80).pfamily == Socket::PF_INET #=> true

Returns:



2203
2204
2205
2206
2207
2208
# File 'raddrinfo.c', line 2203

static VALUE
addrinfo_pfamily(VALUE self)
{
    rb_addrinfo_t *rai = get_addrinfo(self);
    return INT2NUM(rai->pfamily);
}