method
new
v1_9_1_378 -
Show latest stable
- Class:
Socket
new(p1, p2, p3)public
No documentation available.
static VALUE
sock_initialize(VALUE sock, VALUE domain, VALUE type, VALUE protocol)
{
int fd;
int d, t;
rb_secure(3);
setup_domain_and_type(domain, &d, type, &t);
fd = ruby_socket(d, t, NUM2INT(protocol));
if (fd < 0) rb_sys_fail("socket(2)");
return init_sock(sock, fd);
}