blob: 67665604a7f091cee7eb14e92f1d6002cb0eda83 [file] [log] [blame]
Joe Gregorio55d58182011-02-20 01:42:07 -05001
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module httplib2.socks</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="httplib2.html"><font color="#ffffff">httplib2</font></a>.socks</strong></big></big></font></td
10><td align=right valign=bottom
Joe Gregoriob9e63ff2011-06-30 12:38:10 -040011><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/jcgregorio/projects/apiclient/httplib2/socks.py">/usr/local/google/home/jcgregorio/projects/apiclient/httplib2/socks.py</a></font></td></tr></table>
Joe Gregorio55d58182011-02-20 01:42:07 -050012 <p><tt>SocksiPy&nbsp;-&nbsp;Python&nbsp;SOCKS&nbsp;module.<br>
13Version&nbsp;1.00<br>
14&nbsp;<br>
15Copyright&nbsp;2006&nbsp;Dan-Haim.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
16&nbsp;<br>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -040017Redistribution&nbsp;and&nbsp;use&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with&nbsp;or&nbsp;without&nbsp;modification,<br>
18are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following&nbsp;conditions&nbsp;are&nbsp;met:<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500191.&nbsp;Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;this<br>
20&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer.<br>
212.&nbsp;Redistributions&nbsp;in&nbsp;binary&nbsp;form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,<br>
22&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation<br>
23&nbsp;&nbsp;&nbsp;and/or&nbsp;other&nbsp;materials&nbsp;provided&nbsp;with&nbsp;the&nbsp;distribution.<br>
243.&nbsp;Neither&nbsp;the&nbsp;name&nbsp;of&nbsp;Dan&nbsp;Haim&nbsp;nor&nbsp;the&nbsp;names&nbsp;of&nbsp;his&nbsp;contributors&nbsp;may&nbsp;be&nbsp;used<br>
25&nbsp;&nbsp;&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products&nbsp;derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;specific<br>
26&nbsp;&nbsp;&nbsp;prior&nbsp;written&nbsp;permission.<br>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -040027&nbsp;&nbsp;&nbsp;<br>
Joe Gregorio55d58182011-02-20 01:42:07 -050028THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;DAN&nbsp;HAIM&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED<br>
29WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF<br>
30MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;ARE&nbsp;DISCLAIMED.&nbsp;IN&nbsp;NO<br>
31EVENT&nbsp;SHALL&nbsp;DAN&nbsp;HAIM&nbsp;OR&nbsp;HIS&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;INDIRECT,<br>
32INCIDENTAL,&nbsp;SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;BUT&nbsp;NOT<br>
33LIMITED&nbsp;TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA<br>
34OR&nbsp;PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY&nbsp;THEORY&nbsp;OF<br>
35LIABILITY,&nbsp;OR&nbsp;TORT&nbsp;(INCLUDING&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT<br>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -040036OF&nbsp;THE&nbsp;USE&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMANGE.<br>
Joe Gregorio55d58182011-02-20 01:42:07 -050037&nbsp;<br>
38&nbsp;<br>
39This&nbsp;module&nbsp;provides&nbsp;a&nbsp;standard&nbsp;socket-like&nbsp;interface&nbsp;for&nbsp;Python<br>
40for&nbsp;tunneling&nbsp;connections&nbsp;through&nbsp;SOCKS&nbsp;proxies.</tt></p>
41<p>
42<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
43<tr bgcolor="#aa55cc">
44<td colspan=3 valign=bottom>&nbsp;<br>
45<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
46
47<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
48<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="socket.html">socket</a><br>
49</td><td width="25%" valign=top><a href="struct.html">struct</a><br>
50</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
51</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
52<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
53<tr bgcolor="#ee77aa">
54<td colspan=3 valign=bottom>&nbsp;<br>
55<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
56
57<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
58<td width="100%"><dl>
59<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
60</font></dt><dd>
61<dl>
62<dt><font face="helvetica, arial"><a href="httplib2.socks.html#ProxyError">ProxyError</a>
63</font></dt><dd>
64<dl>
65<dt><font face="helvetica, arial"><a href="httplib2.socks.html#GeneralProxyError">GeneralProxyError</a>
66</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#HTTPError">HTTPError</a>
67</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks4Error">Socks4Error</a>
68</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks5AuthError">Socks5AuthError</a>
69</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks5Error">Socks5Error</a>
70</font></dt></dl>
71</dd>
72</dl>
73</dd>
74<dt><font face="helvetica, arial"><a href="socket.html#_socketobject">socket._socketobject</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
75</font></dt><dd>
76<dl>
77<dt><font face="helvetica, arial"><a href="httplib2.socks.html#socksocket">socksocket</a>
78</font></dt></dl>
79</dd>
80</dl>
81 <p>
82<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
83<tr bgcolor="#ffc8d8">
84<td colspan=3 valign=bottom>&nbsp;<br>
85<font color="#000000" face="helvetica, arial"><a name="GeneralProxyError">class <strong>GeneralProxyError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
86
87<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
88<td width="100%"><dl><dt>Method resolution order:</dt>
89<dd><a href="httplib2.socks.html#GeneralProxyError">GeneralProxyError</a></dd>
90<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
91<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
92<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
93<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
94</dl>
95<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -050096Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
97<dl><dt><strong>__weakref__</strong></dt>
98<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
99</dl>
100<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400101Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
102<dl><dt><a name="GeneralProxyError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
103
104<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500105Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
106<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#GeneralProxyError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
107
108<hr>
109Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
110<dl><dt><a name="GeneralProxyError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
111
112<dl><dt><a name="GeneralProxyError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
113
114<dl><dt><a name="GeneralProxyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
115
116<dl><dt><a name="GeneralProxyError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
117&nbsp;<br>
118Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
119
120<dl><dt><a name="GeneralProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
121
122<dl><dt><a name="GeneralProxyError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
123
124<dl><dt><a name="GeneralProxyError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
125
126<dl><dt><a name="GeneralProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
127
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400128<dl><dt><a name="GeneralProxyError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
129
Joe Gregorio55d58182011-02-20 01:42:07 -0500130<dl><dt><a name="GeneralProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
131
132<hr>
133Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
134<dl><dt><strong>__dict__</strong></dt>
135</dl>
136<dl><dt><strong>args</strong></dt>
137</dl>
138<dl><dt><strong>message</strong></dt>
139</dl>
140</td></tr></table> <p>
141<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
142<tr bgcolor="#ffc8d8">
143<td colspan=3 valign=bottom>&nbsp;<br>
144<font color="#000000" face="helvetica, arial"><a name="HTTPError">class <strong>HTTPError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
145
146<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
147<td width="100%"><dl><dt>Method resolution order:</dt>
148<dd><a href="httplib2.socks.html#HTTPError">HTTPError</a></dd>
149<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
150<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
151<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
152<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
153</dl>
154<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500155Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
156<dl><dt><strong>__weakref__</strong></dt>
157<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
158</dl>
159<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400160Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
161<dl><dt><a name="HTTPError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
162
163<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500164Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
165<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#HTTPError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
166
167<hr>
168Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
169<dl><dt><a name="HTTPError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
170
171<dl><dt><a name="HTTPError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
172
173<dl><dt><a name="HTTPError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
174
175<dl><dt><a name="HTTPError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
176&nbsp;<br>
177Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
178
179<dl><dt><a name="HTTPError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
180
181<dl><dt><a name="HTTPError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
182
183<dl><dt><a name="HTTPError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
184
185<dl><dt><a name="HTTPError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
186
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400187<dl><dt><a name="HTTPError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
188
Joe Gregorio55d58182011-02-20 01:42:07 -0500189<dl><dt><a name="HTTPError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
190
191<hr>
192Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
193<dl><dt><strong>__dict__</strong></dt>
194</dl>
195<dl><dt><strong>args</strong></dt>
196</dl>
197<dl><dt><strong>message</strong></dt>
198</dl>
199</td></tr></table> <p>
200<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
201<tr bgcolor="#ffc8d8">
202<td colspan=3 valign=bottom>&nbsp;<br>
203<font color="#000000" face="helvetica, arial"><a name="ProxyError">class <strong>ProxyError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
204
205<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
206<td width="100%"><dl><dt>Method resolution order:</dt>
207<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
208<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
209<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
210<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
211</dl>
212<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500213Data descriptors defined here:<br>
214<dl><dt><strong>__weakref__</strong></dt>
215<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
216</dl>
217<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400218Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
219<dl><dt><a name="ProxyError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
220
221<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500222Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
223<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#ProxyError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
224
225<hr>
226Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
227<dl><dt><a name="ProxyError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
228
229<dl><dt><a name="ProxyError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
230
231<dl><dt><a name="ProxyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
232
233<dl><dt><a name="ProxyError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
234&nbsp;<br>
235Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
236
237<dl><dt><a name="ProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
238
239<dl><dt><a name="ProxyError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
240
241<dl><dt><a name="ProxyError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
242
243<dl><dt><a name="ProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
244
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400245<dl><dt><a name="ProxyError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
246
Joe Gregorio55d58182011-02-20 01:42:07 -0500247<dl><dt><a name="ProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
248
249<hr>
250Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
251<dl><dt><strong>__dict__</strong></dt>
252</dl>
253<dl><dt><strong>args</strong></dt>
254</dl>
255<dl><dt><strong>message</strong></dt>
256</dl>
257</td></tr></table> <p>
258<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
259<tr bgcolor="#ffc8d8">
260<td colspan=3 valign=bottom>&nbsp;<br>
261<font color="#000000" face="helvetica, arial"><a name="Socks4Error">class <strong>Socks4Error</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
262
263<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
264<td width="100%"><dl><dt>Method resolution order:</dt>
265<dd><a href="httplib2.socks.html#Socks4Error">Socks4Error</a></dd>
266<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
267<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
268<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
269<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
270</dl>
271<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500272Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
273<dl><dt><strong>__weakref__</strong></dt>
274<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
275</dl>
276<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400277Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
278<dl><dt><a name="Socks4Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
279
280<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500281Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
282<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks4Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
283
284<hr>
285Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
286<dl><dt><a name="Socks4Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
287
288<dl><dt><a name="Socks4Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
289
290<dl><dt><a name="Socks4Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
291
292<dl><dt><a name="Socks4Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
293&nbsp;<br>
294Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
295
296<dl><dt><a name="Socks4Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
297
298<dl><dt><a name="Socks4Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
299
300<dl><dt><a name="Socks4Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
301
302<dl><dt><a name="Socks4Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
303
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400304<dl><dt><a name="Socks4Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
305
Joe Gregorio55d58182011-02-20 01:42:07 -0500306<dl><dt><a name="Socks4Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
307
308<hr>
309Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
310<dl><dt><strong>__dict__</strong></dt>
311</dl>
312<dl><dt><strong>args</strong></dt>
313</dl>
314<dl><dt><strong>message</strong></dt>
315</dl>
316</td></tr></table> <p>
317<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
318<tr bgcolor="#ffc8d8">
319<td colspan=3 valign=bottom>&nbsp;<br>
320<font color="#000000" face="helvetica, arial"><a name="Socks5AuthError">class <strong>Socks5AuthError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
321
322<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
323<td width="100%"><dl><dt>Method resolution order:</dt>
324<dd><a href="httplib2.socks.html#Socks5AuthError">Socks5AuthError</a></dd>
325<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
326<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
327<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
328<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
329</dl>
330<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500331Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
332<dl><dt><strong>__weakref__</strong></dt>
333<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
334</dl>
335<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400336Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
337<dl><dt><a name="Socks5AuthError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
338
339<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500340Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
341<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks5AuthError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
342
343<hr>
344Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
345<dl><dt><a name="Socks5AuthError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
346
347<dl><dt><a name="Socks5AuthError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
348
349<dl><dt><a name="Socks5AuthError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
350
351<dl><dt><a name="Socks5AuthError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
352&nbsp;<br>
353Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
354
355<dl><dt><a name="Socks5AuthError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
356
357<dl><dt><a name="Socks5AuthError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
358
359<dl><dt><a name="Socks5AuthError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
360
361<dl><dt><a name="Socks5AuthError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
362
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400363<dl><dt><a name="Socks5AuthError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
364
Joe Gregorio55d58182011-02-20 01:42:07 -0500365<dl><dt><a name="Socks5AuthError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
366
367<hr>
368Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
369<dl><dt><strong>__dict__</strong></dt>
370</dl>
371<dl><dt><strong>args</strong></dt>
372</dl>
373<dl><dt><strong>message</strong></dt>
374</dl>
375</td></tr></table> <p>
376<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
377<tr bgcolor="#ffc8d8">
378<td colspan=3 valign=bottom>&nbsp;<br>
379<font color="#000000" face="helvetica, arial"><a name="Socks5Error">class <strong>Socks5Error</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
380
381<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
382<td width="100%"><dl><dt>Method resolution order:</dt>
383<dd><a href="httplib2.socks.html#Socks5Error">Socks5Error</a></dd>
384<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
385<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
386<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
387<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
388</dl>
389<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500390Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
391<dl><dt><strong>__weakref__</strong></dt>
392<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
393</dl>
394<hr>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400395Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
396<dl><dt><a name="Socks5Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>
397
398<hr>
Joe Gregorio55d58182011-02-20 01:42:07 -0500399Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
400<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks5Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
401
402<hr>
403Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
404<dl><dt><a name="Socks5Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
405
406<dl><dt><a name="Socks5Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
407
408<dl><dt><a name="Socks5Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
409
410<dl><dt><a name="Socks5Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
411&nbsp;<br>
412Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
413
414<dl><dt><a name="Socks5Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
415
416<dl><dt><a name="Socks5Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
417
418<dl><dt><a name="Socks5Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
419
420<dl><dt><a name="Socks5Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
421
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400422<dl><dt><a name="Socks5Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
423
Joe Gregorio55d58182011-02-20 01:42:07 -0500424<dl><dt><a name="Socks5Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
425
426<hr>
427Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
428<dl><dt><strong>__dict__</strong></dt>
429</dl>
430<dl><dt><strong>args</strong></dt>
431</dl>
432<dl><dt><strong>message</strong></dt>
433</dl>
434</td></tr></table> <p>
435<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
436<tr bgcolor="#ffc8d8">
437<td colspan=3 valign=bottom>&nbsp;<br>
438<font color="#000000" face="helvetica, arial"><a name="socksocket">class <strong>socksocket</strong></a>(<a href="socket.html#_socketobject">socket._socketobject</a>)</font></td></tr>
439
440<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
441<td colspan=2><tt><a href="#socksocket">socksocket</a>([family[,&nbsp;type[,&nbsp;proto]]])&nbsp;-&gt;&nbsp;socket&nbsp;object<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500442Open&nbsp;a&nbsp;SOCKS&nbsp;enabled&nbsp;socket.&nbsp;The&nbsp;parameters&nbsp;are&nbsp;the&nbsp;same&nbsp;as<br>
443those&nbsp;of&nbsp;the&nbsp;standard&nbsp;socket&nbsp;init.&nbsp;In&nbsp;order&nbsp;for&nbsp;SOCKS&nbsp;to&nbsp;work,<br>
444you&nbsp;must&nbsp;specify&nbsp;family=AF_INET,&nbsp;type=SOCK_STREAM&nbsp;and&nbsp;proto=0.<br>&nbsp;</tt></td></tr>
445<tr><td>&nbsp;</td>
446<td width="100%"><dl><dt>Method resolution order:</dt>
447<dd><a href="httplib2.socks.html#socksocket">socksocket</a></dd>
448<dd><a href="socket.html#_socketobject">socket._socketobject</a></dd>
449<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
450</dl>
451<hr>
452Methods defined here:<br>
453<dl><dt><a name="socksocket-__init__"><strong>__init__</strong></a>(self, family<font color="#909090">=2</font>, type<font color="#909090">=1</font>, proto<font color="#909090">=0</font>, _sock<font color="#909090">=None</font>)</dt></dl>
454
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400455<dl><dt><a name="socksocket-connect"><strong>connect</strong></a>(self, destpair)</dt><dd><tt><a href="#socksocket-connect">connect</a>(self,&nbsp;despair)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500456Connects&nbsp;to&nbsp;the&nbsp;specified&nbsp;destination&nbsp;through&nbsp;a&nbsp;proxy.<br>
457destpar&nbsp;-&nbsp;A&nbsp;tuple&nbsp;of&nbsp;the&nbsp;IP/DNS&nbsp;address&nbsp;and&nbsp;the&nbsp;port&nbsp;number.<br>
458(identical&nbsp;to&nbsp;socket's&nbsp;connect).<br>
459To&nbsp;select&nbsp;the&nbsp;proxy&nbsp;server&nbsp;use&nbsp;<a href="#socksocket-setproxy">setproxy</a>().</tt></dd></dl>
460
461<dl><dt><a name="socksocket-getpeername"><strong>getpeername</strong></a>(self)</dt><dd><tt><a href="#socksocket-getpeername">getpeername</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
462Returns&nbsp;the&nbsp;IP&nbsp;address&nbsp;and&nbsp;port&nbsp;number&nbsp;of&nbsp;the&nbsp;destination<br>
463machine&nbsp;(note:&nbsp;getproxypeername&nbsp;returns&nbsp;the&nbsp;proxy)</tt></dd></dl>
464
465<dl><dt><a name="socksocket-getproxypeername"><strong>getproxypeername</strong></a>(self)</dt><dd><tt><a href="#socksocket-getproxypeername">getproxypeername</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
466Returns&nbsp;the&nbsp;IP&nbsp;and&nbsp;port&nbsp;number&nbsp;of&nbsp;the&nbsp;proxy.</tt></dd></dl>
467
468<dl><dt><a name="socksocket-getproxysockname"><strong>getproxysockname</strong></a>(self)</dt><dd><tt><a href="#socksocket-getsockname">getsockname</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
469Returns&nbsp;the&nbsp;bound&nbsp;IP&nbsp;address&nbsp;and&nbsp;port&nbsp;number&nbsp;at&nbsp;the&nbsp;proxy.</tt></dd></dl>
470
Joe Gregorio55d58182011-02-20 01:42:07 -0500471<dl><dt><a name="socksocket-setproxy"><strong>setproxy</strong></a>(self, proxytype<font color="#909090">=None</font>, addr<font color="#909090">=None</font>, port<font color="#909090">=None</font>, rdns<font color="#909090">=True</font>, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>)</dt><dd><tt><a href="#socksocket-setproxy">setproxy</a>(proxytype,&nbsp;addr[,&nbsp;port[,&nbsp;rdns[,&nbsp;username[,&nbsp;password]]]])<br>
472Sets&nbsp;the&nbsp;proxy&nbsp;to&nbsp;be&nbsp;used.<br>
473proxytype&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;type&nbsp;of&nbsp;the&nbsp;proxy&nbsp;to&nbsp;be&nbsp;used.&nbsp;Three&nbsp;types<br>
474&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;are&nbsp;supported:&nbsp;PROXY_TYPE_SOCKS4&nbsp;(including&nbsp;socks4a),<br>
475&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PROXY_TYPE_SOCKS5&nbsp;and&nbsp;PROXY_TYPE_HTTP<br>
476addr&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;address&nbsp;of&nbsp;the&nbsp;server&nbsp;(IP&nbsp;or&nbsp;DNS).<br>
477port&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;port&nbsp;of&nbsp;the&nbsp;server.&nbsp;Defaults&nbsp;to&nbsp;1080&nbsp;for&nbsp;SOCKS<br>
478&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;servers&nbsp;and&nbsp;8080&nbsp;for&nbsp;HTTP&nbsp;proxy&nbsp;servers.<br>
479rdns&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Should&nbsp;DNS&nbsp;queries&nbsp;be&nbsp;preformed&nbsp;on&nbsp;the&nbsp;remote&nbsp;side<br>
480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rather&nbsp;than&nbsp;the&nbsp;local&nbsp;side).&nbsp;The&nbsp;default&nbsp;is&nbsp;True.<br>
481&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note:&nbsp;This&nbsp;has&nbsp;no&nbsp;effect&nbsp;with&nbsp;SOCKS4&nbsp;servers.<br>
482username&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;Username&nbsp;to&nbsp;authenticate&nbsp;with&nbsp;to&nbsp;the&nbsp;server.<br>
483&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;default&nbsp;is&nbsp;no&nbsp;authentication.<br>
484password&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;Password&nbsp;to&nbsp;authenticate&nbsp;with&nbsp;to&nbsp;the&nbsp;server.<br>
485&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only&nbsp;relevant&nbsp;when&nbsp;username&nbsp;is&nbsp;also&nbsp;provided.</tt></dd></dl>
486
487<hr>
488Data descriptors defined here:<br>
489<dl><dt><strong>__dict__</strong></dt>
490<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
491</dl>
492<hr>
493Methods inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br>
494<dl><dt><a name="socksocket-accept"><strong>accept</strong></a>(self)</dt><dd><tt><a href="#socksocket-accept">accept</a>()&nbsp;-&gt;&nbsp;(socket&nbsp;object,&nbsp;address&nbsp;info)<br>
495&nbsp;<br>
496Wait&nbsp;for&nbsp;an&nbsp;incoming&nbsp;connection.&nbsp;&nbsp;Return&nbsp;a&nbsp;new&nbsp;socket&nbsp;representing&nbsp;the<br>
497connection,&nbsp;and&nbsp;the&nbsp;address&nbsp;of&nbsp;the&nbsp;client.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address<br>
498info&nbsp;is&nbsp;a&nbsp;pair&nbsp;(hostaddr,&nbsp;port).</tt></dd></dl>
499
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400500<dl><dt><a name="socksocket-bind"><strong>bind</strong></a>(...)</dt><dd><tt><a href="#socksocket-bind">bind</a>(address)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500501&nbsp;<br>
502Bind&nbsp;the&nbsp;socket&nbsp;to&nbsp;a&nbsp;local&nbsp;address.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address&nbsp;is&nbsp;a<br>
503pair&nbsp;(host,&nbsp;port);&nbsp;the&nbsp;host&nbsp;must&nbsp;refer&nbsp;to&nbsp;the&nbsp;local&nbsp;host.&nbsp;For&nbsp;raw&nbsp;packet<br>
504sockets&nbsp;the&nbsp;address&nbsp;is&nbsp;a&nbsp;tuple&nbsp;(ifname,&nbsp;proto&nbsp;[,pkttype&nbsp;[,hatype]])</tt></dd></dl>
505
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400506<dl><dt><a name="socksocket-close"><strong>close</strong></a>(self, _closedsocket<font color="#909090">=&lt;class 'socket._closedsocket'&gt;</font>, _delegate_methods<font color="#909090">=('recv', 'recvfrom', 'recv_into', 'recvfrom_into', 'send', 'sendto')</font>, setattr<font color="#909090">=&lt;built-in function setattr&gt;</font>)</dt><dd><tt><a href="#socksocket-close">close</a>()<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500507&nbsp;<br>
508Close&nbsp;the&nbsp;socket.&nbsp;&nbsp;It&nbsp;cannot&nbsp;be&nbsp;used&nbsp;after&nbsp;this&nbsp;call.</tt></dd></dl>
509
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400510<dl><dt><a name="socksocket-connect_ex"><strong>connect_ex</strong></a>(...)</dt><dd><tt><a href="#socksocket-connect_ex">connect_ex</a>(address)&nbsp;-&gt;&nbsp;errno<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500511&nbsp;<br>
512This&nbsp;is&nbsp;like&nbsp;<a href="#socksocket-connect">connect</a>(address),&nbsp;but&nbsp;returns&nbsp;an&nbsp;error&nbsp;code&nbsp;(the&nbsp;errno&nbsp;value)<br>
513instead&nbsp;of&nbsp;raising&nbsp;an&nbsp;exception&nbsp;when&nbsp;an&nbsp;error&nbsp;occurs.</tt></dd></dl>
514
515<dl><dt><a name="socksocket-dup"><strong>dup</strong></a>(self)</dt><dd><tt><a href="#socksocket-dup">dup</a>()&nbsp;-&gt;&nbsp;socket&nbsp;object<br>
516&nbsp;<br>
517Return&nbsp;a&nbsp;new&nbsp;socket&nbsp;object&nbsp;connected&nbsp;to&nbsp;the&nbsp;same&nbsp;system&nbsp;resource.</tt></dd></dl>
518
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400519<dl><dt><a name="socksocket-fileno"><strong>fileno</strong></a>(...)</dt><dd><tt><a href="#socksocket-fileno">fileno</a>()&nbsp;-&gt;&nbsp;integer<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500520&nbsp;<br>
521Return&nbsp;the&nbsp;integer&nbsp;file&nbsp;descriptor&nbsp;of&nbsp;the&nbsp;socket.</tt></dd></dl>
522
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400523<dl><dt><a name="socksocket-getsockname"><strong>getsockname</strong></a>(...)</dt><dd><tt><a href="#socksocket-getsockname">getsockname</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500524&nbsp;<br>
525Return&nbsp;the&nbsp;address&nbsp;of&nbsp;the&nbsp;local&nbsp;endpoint.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address<br>
526info&nbsp;is&nbsp;a&nbsp;pair&nbsp;(hostaddr,&nbsp;port).</tt></dd></dl>
527
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400528<dl><dt><a name="socksocket-getsockopt"><strong>getsockopt</strong></a>(...)</dt><dd><tt><a href="#socksocket-getsockopt">getsockopt</a>(level,&nbsp;option[,&nbsp;buffersize])&nbsp;-&gt;&nbsp;value<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500529&nbsp;<br>
530Get&nbsp;a&nbsp;socket&nbsp;option.&nbsp;&nbsp;See&nbsp;the&nbsp;Unix&nbsp;manual&nbsp;for&nbsp;level&nbsp;and&nbsp;option.<br>
531If&nbsp;a&nbsp;nonzero&nbsp;buffersize&nbsp;argument&nbsp;is&nbsp;given,&nbsp;the&nbsp;return&nbsp;value&nbsp;is&nbsp;a<br>
532string&nbsp;of&nbsp;that&nbsp;length;&nbsp;otherwise&nbsp;it&nbsp;is&nbsp;an&nbsp;integer.</tt></dd></dl>
533
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400534<dl><dt><a name="socksocket-gettimeout"><strong>gettimeout</strong></a>(...)</dt><dd><tt><a href="#socksocket-gettimeout">gettimeout</a>()&nbsp;-&gt;&nbsp;timeout<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500535&nbsp;<br>
536Returns&nbsp;the&nbsp;timeout&nbsp;in&nbsp;floating&nbsp;seconds&nbsp;associated&nbsp;with&nbsp;socket&nbsp;<br>
537operations.&nbsp;A&nbsp;timeout&nbsp;of&nbsp;None&nbsp;indicates&nbsp;that&nbsp;timeouts&nbsp;on&nbsp;socket&nbsp;<br>
538operations&nbsp;are&nbsp;disabled.</tt></dd></dl>
539
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400540<dl><dt><a name="socksocket-listen"><strong>listen</strong></a>(...)</dt><dd><tt><a href="#socksocket-listen">listen</a>(backlog)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500541&nbsp;<br>
542Enable&nbsp;a&nbsp;server&nbsp;to&nbsp;accept&nbsp;connections.&nbsp;&nbsp;The&nbsp;backlog&nbsp;argument&nbsp;must&nbsp;be&nbsp;at<br>
543least&nbsp;1;&nbsp;it&nbsp;specifies&nbsp;the&nbsp;number&nbsp;of&nbsp;unaccepted&nbsp;connection&nbsp;that&nbsp;the&nbsp;system<br>
544will&nbsp;allow&nbsp;before&nbsp;refusing&nbsp;new&nbsp;connections.</tt></dd></dl>
545
546<dl><dt><a name="socksocket-makefile"><strong>makefile</strong></a>(self, mode<font color="#909090">='r'</font>, bufsize<font color="#909090">=-1</font>)</dt><dd><tt><a href="#socksocket-makefile">makefile</a>([mode[,&nbsp;bufsize]])&nbsp;-&gt;&nbsp;file&nbsp;object<br>
547&nbsp;<br>
548Return&nbsp;a&nbsp;regular&nbsp;file&nbsp;object&nbsp;corresponding&nbsp;to&nbsp;the&nbsp;socket.&nbsp;&nbsp;The&nbsp;mode<br>
549and&nbsp;bufsize&nbsp;arguments&nbsp;are&nbsp;as&nbsp;for&nbsp;the&nbsp;built-in&nbsp;open()&nbsp;function.</tt></dd></dl>
550
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400551<dl><dt><a name="socksocket-sendall"><strong>sendall</strong></a>(...)</dt><dd><tt><a href="#socksocket-sendall">sendall</a>(data[,&nbsp;flags])<br>
552&nbsp;<br>
553Send&nbsp;a&nbsp;data&nbsp;string&nbsp;to&nbsp;the&nbsp;socket.&nbsp;&nbsp;For&nbsp;the&nbsp;optional&nbsp;flags<br>
554argument,&nbsp;see&nbsp;the&nbsp;Unix&nbsp;manual.&nbsp;&nbsp;This&nbsp;calls&nbsp;<a href="#socksocket-send">send</a>()&nbsp;repeatedly<br>
555until&nbsp;all&nbsp;data&nbsp;is&nbsp;sent.&nbsp;&nbsp;If&nbsp;an&nbsp;error&nbsp;occurs,&nbsp;it's&nbsp;impossible<br>
556to&nbsp;tell&nbsp;how&nbsp;much&nbsp;data&nbsp;has&nbsp;been&nbsp;sent.</tt></dd></dl>
557
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400558<dl><dt><a name="socksocket-setblocking"><strong>setblocking</strong></a>(...)</dt><dd><tt><a href="#socksocket-setblocking">setblocking</a>(flag)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500559&nbsp;<br>
560Set&nbsp;the&nbsp;socket&nbsp;to&nbsp;blocking&nbsp;(flag&nbsp;is&nbsp;true)&nbsp;or&nbsp;non-blocking&nbsp;(false).<br>
561<a href="#socksocket-setblocking">setblocking</a>(True)&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-settimeout">settimeout</a>(None);<br>
562<a href="#socksocket-setblocking">setblocking</a>(False)&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-settimeout">settimeout</a>(0.0).</tt></dd></dl>
563
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400564<dl><dt><a name="socksocket-setsockopt"><strong>setsockopt</strong></a>(...)</dt><dd><tt><a href="#socksocket-setsockopt">setsockopt</a>(level,&nbsp;option,&nbsp;value)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500565&nbsp;<br>
566Set&nbsp;a&nbsp;socket&nbsp;option.&nbsp;&nbsp;See&nbsp;the&nbsp;Unix&nbsp;manual&nbsp;for&nbsp;level&nbsp;and&nbsp;option.<br>
567The&nbsp;value&nbsp;argument&nbsp;can&nbsp;either&nbsp;be&nbsp;an&nbsp;integer&nbsp;or&nbsp;a&nbsp;string.</tt></dd></dl>
568
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400569<dl><dt><a name="socksocket-settimeout"><strong>settimeout</strong></a>(...)</dt><dd><tt><a href="#socksocket-settimeout">settimeout</a>(timeout)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500570&nbsp;<br>
571Set&nbsp;a&nbsp;timeout&nbsp;on&nbsp;socket&nbsp;operations.&nbsp;&nbsp;'timeout'&nbsp;can&nbsp;be&nbsp;a&nbsp;float,<br>
572giving&nbsp;in&nbsp;seconds,&nbsp;or&nbsp;None.&nbsp;&nbsp;Setting&nbsp;a&nbsp;timeout&nbsp;of&nbsp;None&nbsp;disables<br>
573the&nbsp;timeout&nbsp;feature&nbsp;and&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-setblocking">setblocking</a>(1).<br>
574Setting&nbsp;a&nbsp;timeout&nbsp;of&nbsp;zero&nbsp;is&nbsp;the&nbsp;same&nbsp;as&nbsp;<a href="#socksocket-setblocking">setblocking</a>(0).</tt></dd></dl>
575
Joe Gregorio4258d6b2011-03-18 10:20:16 -0400576<dl><dt><a name="socksocket-shutdown"><strong>shutdown</strong></a>(...)</dt><dd><tt><a href="#socksocket-shutdown">shutdown</a>(flag)<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500577&nbsp;<br>
578Shut&nbsp;down&nbsp;the&nbsp;reading&nbsp;side&nbsp;of&nbsp;the&nbsp;socket&nbsp;(flag&nbsp;==&nbsp;SHUT_RD),&nbsp;the&nbsp;writing&nbsp;side<br>
579of&nbsp;the&nbsp;socket&nbsp;(flag&nbsp;==&nbsp;SHUT_WR),&nbsp;or&nbsp;both&nbsp;ends&nbsp;(flag&nbsp;==&nbsp;SHUT_RDWR).</tt></dd></dl>
580
581<hr>
582Data descriptors inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br>
583<dl><dt><strong>__weakref__</strong></dt>
584<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
585</dl>
586<dl><dt><strong>family</strong></dt>
587<dd><tt>the&nbsp;socket&nbsp;family</tt></dd>
588</dl>
589<dl><dt><strong>proto</strong></dt>
590<dd><tt>the&nbsp;socket&nbsp;protocol</tt></dd>
591</dl>
592<dl><dt><strong>recv</strong></dt>
593</dl>
594<dl><dt><strong>recv_into</strong></dt>
595</dl>
596<dl><dt><strong>recvfrom</strong></dt>
597</dl>
598<dl><dt><strong>recvfrom_into</strong></dt>
599</dl>
600<dl><dt><strong>send</strong></dt>
601</dl>
602<dl><dt><strong>sendto</strong></dt>
603</dl>
604<dl><dt><strong>type</strong></dt>
605<dd><tt>the&nbsp;socket&nbsp;type</tt></dd>
606</dl>
607</td></tr></table></td></tr></table><p>
608<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
609<tr bgcolor="#eeaa77">
610<td colspan=3 valign=bottom>&nbsp;<br>
611<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
612
613<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400614<td width="100%"><dl><dt><a name="-setdefaultproxy"><strong>setdefaultproxy</strong></a>(proxytype<font color="#909090">=None</font>, addr<font color="#909090">=None</font>, port<font color="#909090">=None</font>, rdns<font color="#909090">=True</font>, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>)</dt><dd><tt><a href="#-setdefaultproxy">setdefaultproxy</a>(proxytype,&nbsp;addr[,&nbsp;port[,&nbsp;rdns[,&nbsp;username[,&nbsp;password]]]])<br>
Joe Gregorio55d58182011-02-20 01:42:07 -0500615Sets&nbsp;a&nbsp;default&nbsp;proxy&nbsp;which&nbsp;all&nbsp;further&nbsp;<a href="#socksocket">socksocket</a>&nbsp;objects&nbsp;will&nbsp;use,<br>
616unless&nbsp;explicitly&nbsp;changed.</tt></dd></dl>
Joe Gregoriob9e63ff2011-06-30 12:38:10 -0400617 <dl><dt><a name="-wrapmodule"><strong>wrapmodule</strong></a>(module)</dt><dd><tt><a href="#-wrapmodule">wrapmodule</a>(module)<br>
618Attempts&nbsp;to&nbsp;replace&nbsp;a&nbsp;module's&nbsp;socket&nbsp;library&nbsp;with&nbsp;a&nbsp;SOCKS&nbsp;socket.&nbsp;Must&nbsp;set<br>
619a&nbsp;default&nbsp;proxy&nbsp;using&nbsp;<a href="#-setdefaultproxy">setdefaultproxy</a>(...)&nbsp;first.<br>
620This&nbsp;will&nbsp;only&nbsp;work&nbsp;on&nbsp;modules&nbsp;that&nbsp;import&nbsp;socket&nbsp;directly&nbsp;into&nbsp;the&nbsp;namespace;<br>
621most&nbsp;of&nbsp;the&nbsp;Python&nbsp;Standard&nbsp;Library&nbsp;falls&nbsp;into&nbsp;this&nbsp;category.</tt></dd></dl>
Joe Gregorio55d58182011-02-20 01:42:07 -0500622</td></tr></table><p>
623<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
624<tr bgcolor="#55aa55">
625<td colspan=3 valign=bottom>&nbsp;<br>
626<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
627
628<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
629<td width="100%"><strong>PROXY_TYPE_HTTP</strong> = 3<br>
630<strong>PROXY_TYPE_SOCKS4</strong> = 1<br>
631<strong>PROXY_TYPE_SOCKS5</strong> = 2</td></tr></table>
632</body></html>