Slide 60
Slide 60 text
TPDL@JOJUJBMJ[F 4PDLFUJOJUJBMJ[Fͷ࣮ମ
static VALUE
sock_initialize(int argc, VALUE *argv, VALUE sock)
{
VALUE domain, type, protocol;
int fd;
int d, t;
rb_scan_args(argc, argv, "21", &domain, &type, &protocol);
// ...
fd = rsock_socket(d, t, NUM2INT(protocol));
if (fd < 0) rb_sys_fail("socket(2)");
return rsock_init_sock(sock, fd);
}
FYUTPDLFUTPDLFUD