~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to ext/socket/sockssocket.c

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include "rubysocket.h"
12
12
 
13
13
#ifdef SOCKS
 
14
/*
 
15
 * call-seq:
 
16
 *   SOCKSSocket.new(host, serv) => socket
 
17
 *
 
18
 * Opens a SOCKS connection to +host+ via the SOCKS server +serv+.
 
19
 *
 
20
 */
14
21
static VALUE
15
22
socks_init(VALUE sock, VALUE host, VALUE serv)
16
23
{
25
32
}
26
33
 
27
34
#ifdef SOCKS5
 
35
/*
 
36
 * Closes the SOCKS connection.
 
37
 *
 
38
 */
28
39
static VALUE
29
40
socks_s_close(VALUE sock)
30
41
{
40
51
#endif
41
52
#endif
42
53
 
43
 
/*
44
 
 * Document-class: ::SOCKSSocket < TCPSocket
45
 
 *
46
 
 * SOCKSSocket class
47
 
 */
48
54
void
49
55
rsock_init_sockssocket(void)
50
56
{
51
57
#ifdef SOCKS
 
58
    /*
 
59
     * Document-class: SOCKSSocket < TCPSocket
 
60
     *
 
61
     * SOCKS is an Internet protocol that routes packets between a client and
 
62
     * a server through a proxy server.  SOCKS5, if supported, additionally
 
63
     * provides authentication so only authorized users may access a server.
 
64
     */
52
65
    rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
53
66
    rb_define_method(rb_cSOCKSSocket, "initialize", socks_init, 2);
54
67
#ifdef SOCKS5