rb_cTCPSocket
static VALUE socks_init(VALUE sock, VALUE host, VALUE serv) { static int init = 0; if (init == 0) { SOCKSinit("ruby"); init = 1; } return rsock_init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS); }
static VALUE socks_s_close(VALUE sock) { rb_io_t *fptr; if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { rb_raise(rb_eSecurityError, "Insecure: can't close socket"); } GetOpenFile(sock, fptr); shutdown(fptr->fd, 2); return rb_io_close(sock); }
This page was generated for Ruby 1.9.2
Ruby-doc.org is hosted by James Britt and Neurogami, an avant garage research + development in Scottsdale, AZ.
Generated with the Rubydoc Rdoc Generator 0.9.3.