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