method

pair

v1_9_1_378 - Show latest stable - Class: UNIXSocket
pair(p1 = v1, p2 = v2)
public

No documentation available.

static VALUE
unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
{
    VALUE domain, type, protocol;
    domain = INT2FIX(PF_UNIX);

    rb_scan_args(argc, argv, "02", &type, &protocol);
    if (argc == 0)
        type = INT2FIX(SOCK_STREAM);
    if (argc <= 1)
        protocol = INT2FIX(0);

    return sock_s_socketpair(klass, domain, type, protocol);
}