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 | 351b149 | 2011-05-08 23:32:46 -0700 | [diff] [blame^] | 11 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/google-api-python-client/httplib2/socks.py">/home/jcgregorio/projects/google-api-python-client/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> |
| 17 | Redistribution and use in source and binary forms, with or without<br> |
| 18 | modification, are permitted provided that the following conditions are met:<br> |
| 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> |
| 27 | <br> |
| 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> |
| 36 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br> |
| 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> |
| 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> <br> |
| 55 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| 56 | |
| 57 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </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> <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> </tt></td><td> </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> |
| 96 | Methods defined here:<br> |
| 97 | <dl><dt><a name="GeneralProxyError-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 98 | |
| 99 | <dl><dt><a name="GeneralProxyError-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 100 | |
| 101 | <hr> |
| 102 | Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br> |
| 103 | <dl><dt><strong>__weakref__</strong></dt> |
| 104 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 105 | </dl> |
| 106 | <hr> |
| 107 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 108 | <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> |
| 109 | |
| 110 | <hr> |
| 111 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 112 | <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> |
| 113 | |
| 114 | <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> |
| 115 | |
| 116 | <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> |
| 117 | |
| 118 | <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> |
| 119 | <br> |
| 120 | Use of negative indices is not supported.</tt></dd></dl> |
| 121 | |
| 122 | <dl><dt><a name="GeneralProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 123 | |
| 124 | <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> |
| 125 | |
| 126 | <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> |
| 127 | |
| 128 | <dl><dt><a name="GeneralProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 129 | |
| 130 | <dl><dt><a name="GeneralProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 131 | |
| 132 | <hr> |
| 133 | Data 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> <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> </tt></td><td> </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> |
| 155 | Methods defined here:<br> |
| 156 | <dl><dt><a name="HTTPError-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 157 | |
| 158 | <dl><dt><a name="HTTPError-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 159 | |
| 160 | <hr> |
| 161 | Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br> |
| 162 | <dl><dt><strong>__weakref__</strong></dt> |
| 163 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 164 | </dl> |
| 165 | <hr> |
| 166 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 167 | <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> |
| 168 | |
| 169 | <hr> |
| 170 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 171 | <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> |
| 172 | |
| 173 | <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> |
| 174 | |
| 175 | <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> |
| 176 | |
| 177 | <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> |
| 178 | <br> |
| 179 | Use of negative indices is not supported.</tt></dd></dl> |
| 180 | |
| 181 | <dl><dt><a name="HTTPError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 182 | |
| 183 | <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> |
| 184 | |
| 185 | <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> |
| 186 | |
| 187 | <dl><dt><a name="HTTPError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 188 | |
| 189 | <dl><dt><a name="HTTPError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 190 | |
| 191 | <hr> |
| 192 | Data 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> <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> </tt></td><td> </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> |
| 213 | Methods defined here:<br> |
| 214 | <dl><dt><a name="ProxyError-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 215 | |
| 216 | <dl><dt><a name="ProxyError-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 217 | |
| 218 | <hr> |
| 219 | Data descriptors defined here:<br> |
| 220 | <dl><dt><strong>__weakref__</strong></dt> |
| 221 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 222 | </dl> |
| 223 | <hr> |
| 224 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 225 | <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> |
| 226 | |
| 227 | <hr> |
| 228 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 229 | <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> |
| 230 | |
| 231 | <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> |
| 232 | |
| 233 | <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> |
| 234 | |
| 235 | <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> |
| 236 | <br> |
| 237 | Use of negative indices is not supported.</tt></dd></dl> |
| 238 | |
| 239 | <dl><dt><a name="ProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 240 | |
| 241 | <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> |
| 242 | |
| 243 | <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> |
| 244 | |
| 245 | <dl><dt><a name="ProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 246 | |
| 247 | <dl><dt><a name="ProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 248 | |
| 249 | <hr> |
| 250 | Data 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> <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> </tt></td><td> </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> |
| 272 | Methods defined here:<br> |
| 273 | <dl><dt><a name="Socks4Error-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 274 | |
| 275 | <dl><dt><a name="Socks4Error-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 276 | |
| 277 | <hr> |
| 278 | Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br> |
| 279 | <dl><dt><strong>__weakref__</strong></dt> |
| 280 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 281 | </dl> |
| 282 | <hr> |
| 283 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 284 | <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> |
| 285 | |
| 286 | <hr> |
| 287 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 288 | <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> |
| 289 | |
| 290 | <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> |
| 291 | |
| 292 | <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> |
| 293 | |
| 294 | <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> |
| 295 | <br> |
| 296 | Use of negative indices is not supported.</tt></dd></dl> |
| 297 | |
| 298 | <dl><dt><a name="Socks4Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 299 | |
| 300 | <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> |
| 301 | |
| 302 | <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> |
| 303 | |
| 304 | <dl><dt><a name="Socks4Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 305 | |
| 306 | <dl><dt><a name="Socks4Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 307 | |
| 308 | <hr> |
| 309 | Data 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> <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> </tt></td><td> </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> |
| 331 | Methods defined here:<br> |
| 332 | <dl><dt><a name="Socks5AuthError-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 333 | |
| 334 | <dl><dt><a name="Socks5AuthError-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 335 | |
| 336 | <hr> |
| 337 | Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br> |
| 338 | <dl><dt><strong>__weakref__</strong></dt> |
| 339 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 340 | </dl> |
| 341 | <hr> |
| 342 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 343 | <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> |
| 344 | |
| 345 | <hr> |
| 346 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 347 | <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> |
| 348 | |
| 349 | <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> |
| 350 | |
| 351 | <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> |
| 352 | |
| 353 | <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> |
| 354 | <br> |
| 355 | Use of negative indices is not supported.</tt></dd></dl> |
| 356 | |
| 357 | <dl><dt><a name="Socks5AuthError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 358 | |
| 359 | <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> |
| 360 | |
| 361 | <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> |
| 362 | |
| 363 | <dl><dt><a name="Socks5AuthError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 364 | |
| 365 | <dl><dt><a name="Socks5AuthError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 366 | |
| 367 | <hr> |
| 368 | Data 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> <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> </tt></td><td> </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> |
| 390 | Methods defined here:<br> |
| 391 | <dl><dt><a name="Socks5Error-__init__"><strong>__init__</strong></a>(self, value)</dt></dl> |
| 392 | |
| 393 | <dl><dt><a name="Socks5Error-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| 394 | |
| 395 | <hr> |
| 396 | Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br> |
| 397 | <dl><dt><strong>__weakref__</strong></dt> |
| 398 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 399 | </dl> |
| 400 | <hr> |
| 401 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 402 | <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> |
| 403 | |
| 404 | <hr> |
| 405 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 406 | <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> |
| 407 | |
| 408 | <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> |
| 409 | |
| 410 | <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> |
| 411 | |
| 412 | <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> |
| 413 | <br> |
| 414 | Use of negative indices is not supported.</tt></dd></dl> |
| 415 | |
| 416 | <dl><dt><a name="Socks5Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 417 | |
| 418 | <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> |
| 419 | |
| 420 | <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> |
| 421 | |
| 422 | <dl><dt><a name="Socks5Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 423 | |
| 424 | <dl><dt><a name="Socks5Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 425 | |
| 426 | <hr> |
| 427 | Data 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> <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> </tt></td> |
| 441 | <td colspan=2><tt><a href="#socksocket">socksocket</a>([family[, type[, proto]]]) -> socket object<br> |
| 442 | <br> |
| 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 | |
| 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> |
| 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 | |
| 472 | <dl><dt><a name="socksocket-sendall"><strong>sendall</strong></a>(self, bytes)</dt></dl> |
| 473 | |
| 474 | <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> |
| 475 | Sets the proxy to be used.<br> |
| 476 | proxytype - The type of the proxy to be used. Three types<br> |
| 477 | are supported: PROXY_TYPE_SOCKS4 (including socks4a),<br> |
| 478 | PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP<br> |
| 479 | addr - The address of the server (IP or DNS).<br> |
| 480 | port - The port of the server. Defaults to 1080 for SOCKS<br> |
| 481 | servers and 8080 for HTTP proxy servers.<br> |
| 482 | rdns - Should DNS queries be preformed on the remote side<br> |
| 483 | (rather than the local side). The default is True.<br> |
| 484 | Note: This has no effect with SOCKS4 servers.<br> |
| 485 | username - Username to authenticate with to the server.<br> |
| 486 | The default is no authentication.<br> |
| 487 | password - Password to authenticate with to the server.<br> |
| 488 | Only relevant when username is also provided.</tt></dd></dl> |
| 489 | |
| 490 | <hr> |
| 491 | Data descriptors defined here:<br> |
| 492 | <dl><dt><strong>__dict__</strong></dt> |
| 493 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 494 | </dl> |
| 495 | <hr> |
| 496 | Methods inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br> |
| 497 | <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> |
| 498 | <br> |
| 499 | Wait for an incoming connection. Return a new socket representing the<br> |
| 500 | connection, and the address of the client. For IP sockets, the address<br> |
| 501 | info is a pair (hostaddr, port).</tt></dd></dl> |
| 502 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 503 | <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] | 504 | <br> |
| 505 | Bind the socket to a local address. For IP sockets, the address is a<br> |
| 506 | pair (host, port); the host must refer to the local host. For raw packet<br> |
| 507 | sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])</tt></dd></dl> |
| 508 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 509 | <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] | 510 | <br> |
| 511 | Close the socket. It cannot be used after this call.</tt></dd></dl> |
| 512 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 513 | <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] | 514 | <br> |
| 515 | This is like <a href="#socksocket-connect">connect</a>(address), but returns an error code (the errno value)<br> |
| 516 | instead of raising an exception when an error occurs.</tt></dd></dl> |
| 517 | |
| 518 | <dl><dt><a name="socksocket-dup"><strong>dup</strong></a>(self)</dt><dd><tt><a href="#socksocket-dup">dup</a>() -> socket object<br> |
| 519 | <br> |
| 520 | Return a new socket object connected to the same system resource.</tt></dd></dl> |
| 521 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 522 | <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] | 523 | <br> |
| 524 | Return the integer file descriptor of the socket.</tt></dd></dl> |
| 525 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 526 | <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] | 527 | <br> |
| 528 | Return the address of the local endpoint. For IP sockets, the address<br> |
| 529 | info is a pair (hostaddr, port).</tt></dd></dl> |
| 530 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 531 | <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] | 532 | <br> |
| 533 | Get a socket option. See the Unix manual for level and option.<br> |
| 534 | If a nonzero buffersize argument is given, the return value is a<br> |
| 535 | string of that length; otherwise it is an integer.</tt></dd></dl> |
| 536 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 537 | <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] | 538 | <br> |
| 539 | Returns the timeout in floating seconds associated with socket <br> |
| 540 | operations. A timeout of None indicates that timeouts on socket <br> |
| 541 | operations are disabled.</tt></dd></dl> |
| 542 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 543 | <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] | 544 | <br> |
| 545 | Enable a server to accept connections. The backlog argument must be at<br> |
| 546 | least 1; it specifies the number of unaccepted connection that the system<br> |
| 547 | will allow before refusing new connections.</tt></dd></dl> |
| 548 | |
| 549 | <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> |
| 550 | <br> |
| 551 | Return a regular file object corresponding to the socket. The mode<br> |
| 552 | and bufsize arguments are as for the built-in open() function.</tt></dd></dl> |
| 553 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 554 | <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] | 555 | <br> |
| 556 | Set the socket to blocking (flag is true) or non-blocking (false).<br> |
| 557 | <a href="#socksocket-setblocking">setblocking</a>(True) is equivalent to <a href="#socksocket-settimeout">settimeout</a>(None);<br> |
| 558 | <a href="#socksocket-setblocking">setblocking</a>(False) is equivalent to <a href="#socksocket-settimeout">settimeout</a>(0.0).</tt></dd></dl> |
| 559 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 560 | <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] | 561 | <br> |
| 562 | Set a socket option. See the Unix manual for level and option.<br> |
| 563 | The value argument can either be an integer or a string.</tt></dd></dl> |
| 564 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 565 | <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] | 566 | <br> |
| 567 | Set a timeout on socket operations. 'timeout' can be a float,<br> |
| 568 | giving in seconds, or None. Setting a timeout of None disables<br> |
| 569 | the timeout feature and is equivalent to <a href="#socksocket-setblocking">setblocking</a>(1).<br> |
| 570 | Setting a timeout of zero is the same as <a href="#socksocket-setblocking">setblocking</a>(0).</tt></dd></dl> |
| 571 | |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 572 | <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] | 573 | <br> |
| 574 | Shut down the reading side of the socket (flag == SHUT_RD), the writing side<br> |
| 575 | of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).</tt></dd></dl> |
| 576 | |
| 577 | <hr> |
| 578 | Data descriptors inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br> |
| 579 | <dl><dt><strong>__weakref__</strong></dt> |
| 580 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 581 | </dl> |
| 582 | <dl><dt><strong>family</strong></dt> |
| 583 | <dd><tt>the socket family</tt></dd> |
| 584 | </dl> |
| 585 | <dl><dt><strong>proto</strong></dt> |
| 586 | <dd><tt>the socket protocol</tt></dd> |
| 587 | </dl> |
| 588 | <dl><dt><strong>recv</strong></dt> |
| 589 | </dl> |
| 590 | <dl><dt><strong>recv_into</strong></dt> |
| 591 | </dl> |
| 592 | <dl><dt><strong>recvfrom</strong></dt> |
| 593 | </dl> |
| 594 | <dl><dt><strong>recvfrom_into</strong></dt> |
| 595 | </dl> |
| 596 | <dl><dt><strong>send</strong></dt> |
| 597 | </dl> |
| 598 | <dl><dt><strong>sendto</strong></dt> |
| 599 | </dl> |
| 600 | <dl><dt><strong>type</strong></dt> |
| 601 | <dd><tt>the socket type</tt></dd> |
| 602 | </dl> |
| 603 | </td></tr></table></td></tr></table><p> |
| 604 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 605 | <tr bgcolor="#eeaa77"> |
| 606 | <td colspan=3 valign=bottom> <br> |
| 607 | <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| 608 | |
| 609 | <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
| 610 | <td width="100%"><dl><dt><a name="-bytes"><strong>bytes</strong></a>(obj, enc<font color="#909090">=None</font>)</dt></dl> |
| 611 | <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> |
| 612 | Sets a default proxy which all further <a href="#socksocket">socksocket</a> objects will use,<br> |
| 613 | unless explicitly changed.</tt></dd></dl> |
| 614 | </td></tr></table><p> |
| 615 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 616 | <tr bgcolor="#55aa55"> |
| 617 | <td colspan=3 valign=bottom> <br> |
| 618 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 619 | |
| 620 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| 621 | <td width="100%"><strong>PROXY_TYPE_HTTP</strong> = 3<br> |
| 622 | <strong>PROXY_TYPE_SOCKS4</strong> = 1<br> |
| 623 | <strong>PROXY_TYPE_SOCKS5</strong> = 2</td></tr></table> |
| 624 | </body></html> |