new(p1, p2, p3 = v3, p4 = v4)
public
Opens a TCP connection to remote_host on remote_port. If
local_host and local_port are specified, then those
parameters are used on the local end to establish the connection.
Show source
static VALUE
tcp_init(int argc, VALUE *argv, VALUE sock)
{
VALUE remote_host, remote_serv;
VALUE local_host, local_serv;
rb_scan_args(argc, argv, "22", &remote_host, &remote_serv,
&local_host, &local_serv);
return rsock_init_inetsock(sock, remote_host, remote_serv,
local_host, local_serv, INET_CLIENT);
}