Method: Addrinfo.tcp
- Defined in:
- raddrinfo.c
.tcp(host, port) ⇒ Object
returns an addrinfo object for TCP address.
Addrinfo.tcp("localhost", "smtp") #=> #<Addrinfo: 127.0.0.1:25 TCP (localhost:smtp)>
2888 2889 2890 2891 2892 2893 |
# File 'raddrinfo.c', line 2888
static VALUE
addrinfo_s_tcp(VALUE self, VALUE host, VALUE port)
{
return addrinfo_firstonly_new(host, port,
INT2NUM(PF_UNSPEC), INT2NUM(SOCK_STREAM), INT2NUM(IPPROTO_TCP), INT2FIX(0));
}
|