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