protocol()
returns the socket type as an integer.
Addrinfo.tcp("localhost", 80).protocol == Socket::IPPROTO_TCP #=> true
static VALUE addrinfo_protocol(VALUE self) { rb_addrinfo_t *rai = get_addrinfo(self); return INT2NUM(rai->protocol); }