/socket.html
HTML | 1079 lines | 981 code | 98 blank | 0 comment | 0 complexity | 4c0d84cdabd49cf9f8982a3cf1d2c4ef MD5 | raw file
Possible License(s): GPL-3.0
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html><head><title>Python: module socket</title>
- </head><body bgcolor="#f0f0f8">
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
- <tr bgcolor="#7799ee">
- <td valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>socket</strong></big></big></font></td
- ><td align=right valign=bottom
- ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/lib/python2.7/socket.py">/usr/lib/python2.7/socket.py</a><br><a href="http://docs.python.org/library/socket">Module Docs</a></font></td></tr></table>
- <p><tt>This module provides <a href="#socket">socket</a> operations and some related functions.<br>
- On Unix, it supports IP (Internet Protocol) and Unix domain sockets.<br>
- On other systems, it only supports IP. Functions specific for a<br>
- <a href="#socket">socket</a> are available as methods of the <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>.<br>
- <br>
- Functions:<br>
- <br>
- <a href="#socket">socket</a>() -- create a new <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <a href="#-socketpair">socketpair</a>() -- create a pair of new <a href="#socket">socket</a> objects [*]<br>
- <a href="#-fromfd">fromfd</a>() -- create a <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> from an open file descriptor [*]<br>
- <a href="#-gethostname">gethostname</a>() -- return the current hostname<br>
- <a href="#-gethostbyname">gethostbyname</a>() -- map a hostname to its IP number<br>
- <a href="#-gethostbyaddr">gethostbyaddr</a>() -- map an IP number or hostname to DNS info<br>
- <a href="#-getservbyname">getservbyname</a>() -- map a service name and a protocol name to a port number<br>
- <a href="#-getprotobyname">getprotobyname</a>() -- map a protocol name (e.g. 'tcp') to a number<br>
- <a href="#-ntohs">ntohs</a>(), <a href="#-ntohl">ntohl</a>() -- convert 16, 32 bit int from network to host byte order<br>
- <a href="#-htons">htons</a>(), <a href="#-htonl">htonl</a>() -- convert 16, 32 bit int from host to network byte order<br>
- <a href="#-inet_aton">inet_aton</a>() -- convert IP addr string (123.45.67.89) to 32-bit packed format<br>
- <a href="#-inet_ntoa">inet_ntoa</a>() -- convert 32-bit packed format IP to string (123.45.67.89)<br>
- ssl() -- secure <a href="#socket">socket</a> layer support (only available if configured)<br>
- <a href="#socket">socket</a>.<a href="#-getdefaulttimeout">getdefaulttimeout</a>() -- get the default <a href="#timeout">timeout</a> value<br>
- <a href="#socket">socket</a>.<a href="#-setdefaulttimeout">setdefaulttimeout</a>() -- set the default <a href="#timeout">timeout</a> value<br>
- <a href="#-create_connection">create_connection</a>() -- connects to an address, with an optional <a href="#timeout">timeout</a> and<br>
- optional source address.<br>
- <br>
- [*] not available on all platforms!<br>
- <br>
- Special objects:<br>
- <br>
- <a href="#SocketType">SocketType</a> -- type <a href="__builtin__.html#object">object</a> for <a href="#socket">socket</a> objects<br>
- <a href="#error">error</a> -- exception raised for I/O errors<br>
- has_ipv6 -- boolean value indicating if IPv6 is supported<br>
- <br>
- Integer constants:<br>
- <br>
- AF_INET, AF_UNIX -- <a href="#socket">socket</a> domains (first argument to <a href="#socket">socket</a>() call)<br>
- SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- <a href="#socket">socket</a> types (second argument)<br>
- <br>
- Many other constants may be defined; these may be used in calls to<br>
- the setsockopt() and getsockopt() methods.</tt></p>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#aa55cc">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
-
- <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
- <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="_socket.html">_socket</a><br>
- <a href="_ssl.html">_ssl</a><br>
- </td><td width="25%" valign=top><a href="errno.html">errno</a><br>
- <a href="os.html">os</a><br>
- </td><td width="25%" valign=top><a href="sys.html">sys</a><br>
- <a href="warnings.html">warnings</a><br>
- </td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ee77aa">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
-
- <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
- <td width="100%"><dl>
- <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
- </font></dt><dd>
- <dl>
- <dt><font face="helvetica, arial"><a href="socket.html#_socketobject">_socketobject</a>
- </font></dt><dt><font face="helvetica, arial"><a href="socket.html#_socketobject">_socketobject</a>
- </font></dt></dl>
- </dd>
- <dt><font face="helvetica, arial"><a href="exceptions.html#IOError">exceptions.IOError</a>(<a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>)
- </font></dt><dd>
- <dl>
- <dt><font face="helvetica, arial"><a href="socket.html#error">error</a>
- </font></dt><dd>
- <dl>
- <dt><font face="helvetica, arial"><a href="socket.html#gaierror">gaierror</a>
- </font></dt><dt><font face="helvetica, arial"><a href="socket.html#herror">herror</a>
- </font></dt><dt><font face="helvetica, arial"><a href="socket.html#timeout">timeout</a>
- </font></dt></dl>
- </dd>
- </dl>
- </dd>
- </dl>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><strong>SocketType</strong> = <a name="SocketType">class _socketobject</a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt><a href="#socket">socket</a>([family[, type[, proto]]]) -> <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <br>
- Open a <a href="#socket">socket</a> of the given type. The family argument specifies the<br>
- address family; it defaults to AF_INET. The type argument specifies<br>
- whether this is a stream (SOCK_STREAM, this is the default)<br>
- or datagram (SOCK_DGRAM) <a href="#socket">socket</a>. The protocol argument defaults to 0,<br>
- specifying the default protocol. Keyword arguments are accepted.<br>
- <br>
- A <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> represents one endpoint of a network connection.<br>
- <br>
- Methods of <a href="#socket">socket</a> objects (keyword arguments not allowed):<br>
- <br>
- <a href="#SocketType-accept">accept</a>() -- accept a connection, returning new <a href="#socket">socket</a> and client address<br>
- <a href="#SocketType-bind">bind</a>(addr) -- bind the <a href="#socket">socket</a> to a local address<br>
- <a href="#SocketType-close">close</a>() -- close the <a href="#socket">socket</a><br>
- <a href="#SocketType-connect">connect</a>(addr) -- connect the <a href="#socket">socket</a> to a remote address<br>
- <a href="#SocketType-connect_ex">connect_ex</a>(addr) -- connect, return an <a href="#error">error</a> code instead of an exception<br>
- <a href="#SocketType-dup">dup</a>() -- return a new <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> identical to the current one [*]<br>
- <a href="#SocketType-fileno">fileno</a>() -- return underlying file descriptor<br>
- <a href="#SocketType-getpeername">getpeername</a>() -- return remote address [*]<br>
- <a href="#SocketType-getsockname">getsockname</a>() -- return local address<br>
- <a href="#SocketType-getsockopt">getsockopt</a>(level, optname[, buflen]) -- get <a href="#socket">socket</a> options<br>
- <a href="#SocketType-gettimeout">gettimeout</a>() -- return <a href="#timeout">timeout</a> or None<br>
- <a href="#SocketType-listen">listen</a>(n) -- start listening for incoming connections<br>
- <a href="#SocketType-makefile">makefile</a>([mode, [bufsize]]) -- return a file <a href="__builtin__.html#object">object</a> for the <a href="#socket">socket</a> [*]<br>
- <a href="#SocketType-recv">recv</a>(buflen[, flags]) -- receive data<br>
- <a href="#SocketType-recv_into">recv_into</a>(buffer[, nbytes[, flags]]) -- receive data (into a buffer)<br>
- <a href="#SocketType-recvfrom">recvfrom</a>(buflen[, flags]) -- receive data and sender's address<br>
- <a href="#SocketType-recvfrom_into">recvfrom_into</a>(buffer[, nbytes, [, flags])<br>
- -- receive data and sender's address (into a buffer)<br>
- <a href="#SocketType-sendall">sendall</a>(data[, flags]) -- send all data<br>
- <a href="#SocketType-send">send</a>(data[, flags]) -- send data, may not send all of it<br>
- <a href="#SocketType-sendto">sendto</a>(data[, flags], addr) -- send data to a given address<br>
- <a href="#SocketType-setblocking">setblocking</a>(0 | 1) -- set or clear the blocking I/O flag<br>
- <a href="#SocketType-setsockopt">setsockopt</a>(level, optname, value) -- set <a href="#socket">socket</a> options<br>
- <a href="#SocketType-settimeout">settimeout</a>(None | float) -- set or clear the <a href="#timeout">timeout</a><br>
- <a href="#SocketType-shutdown">shutdown</a>(how) -- shut down traffic in one or both directions<br>
- <br>
- [*] not available on all platforms!<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="_socketobject-__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>
- <dl><dt><a name="_socketobject-accept"><strong>accept</strong></a>(self)</dt><dd><tt><a href="#SocketType-accept">accept</a>() -> (<a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>, address info)<br>
- <br>
- Wait for an incoming connection. Return a new <a href="#socket">socket</a> representing the<br>
- connection, and the address of the client. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-bind"><strong>bind</strong></a>(...)</dt><dd><tt><a href="#SocketType-bind">bind</a>(address)<br>
- <br>
- Bind the <a href="#socket">socket</a> to a local address. For IP sockets, the address is a<br>
- pair (host, port); the host must refer to the local host. For raw packet<br>
- sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])</tt></dd></dl>
- <dl><dt><a name="_socketobject-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="#SocketType-close">close</a>()<br>
- <br>
- Close the <a href="#socket">socket</a>. It cannot be used after this call.</tt></dd></dl>
- <dl><dt><a name="_socketobject-connect"><strong>connect</strong></a>(...)</dt><dd><tt><a href="#SocketType-connect">connect</a>(address)<br>
- <br>
- Connect the <a href="#socket">socket</a> to a remote address. For IP sockets, the address<br>
- is a pair (host, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-connect_ex"><strong>connect_ex</strong></a>(...)</dt><dd><tt><a href="#SocketType-connect_ex">connect_ex</a>(address) -> errno<br>
- <br>
- This is like <a href="#SocketType-connect">connect</a>(address), but returns an <a href="#error">error</a> code (the errno value)<br>
- instead of raising an exception when an <a href="#error">error</a> occurs.</tt></dd></dl>
- <dl><dt><a name="_socketobject-dup"><strong>dup</strong></a>(self)</dt><dd><tt><a href="#SocketType-dup">dup</a>() -> <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <br>
- Return a new <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> connected to the same system resource.</tt></dd></dl>
- <dl><dt><a name="_socketobject-fileno"><strong>fileno</strong></a>(...)</dt><dd><tt><a href="#SocketType-fileno">fileno</a>() -> integer<br>
- <br>
- Return the integer file descriptor of the <a href="#socket">socket</a>.</tt></dd></dl>
- <dl><dt><a name="_socketobject-getpeername"><strong>getpeername</strong></a>(...)</dt><dd><tt><a href="#SocketType-getpeername">getpeername</a>() -> address info<br>
- <br>
- Return the address of the remote endpoint. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-getsockname"><strong>getsockname</strong></a>(...)</dt><dd><tt><a href="#SocketType-getsockname">getsockname</a>() -> address info<br>
- <br>
- Return the address of the local endpoint. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-getsockopt"><strong>getsockopt</strong></a>(...)</dt><dd><tt><a href="#SocketType-getsockopt">getsockopt</a>(level, option[, buffersize]) -> value<br>
- <br>
- Get a <a href="#socket">socket</a> option. See the Unix manual for level and option.<br>
- If a nonzero buffersize argument is given, the return value is a<br>
- string of that length; otherwise it is an integer.</tt></dd></dl>
- <dl><dt><a name="_socketobject-gettimeout"><strong>gettimeout</strong></a>(...)</dt><dd><tt><a href="#SocketType-gettimeout">gettimeout</a>() -> <a href="#timeout">timeout</a><br>
- <br>
- Returns the <a href="#timeout">timeout</a> in seconds (float) associated with <a href="#socket">socket</a> <br>
- operations. A <a href="#timeout">timeout</a> of None indicates that timeouts on <a href="#socket">socket</a> <br>
- operations are disabled.</tt></dd></dl>
- <dl><dt><a name="_socketobject-listen"><strong>listen</strong></a>(...)</dt><dd><tt><a href="#SocketType-listen">listen</a>(backlog)<br>
- <br>
- Enable a server to accept connections. The backlog argument must be at<br>
- least 0 (if it is lower, it is set to 0); it specifies the number of<br>
- unaccepted connections that the system will allow before refusing new<br>
- connections.</tt></dd></dl>
- <dl><dt><a name="_socketobject-makefile"><strong>makefile</strong></a>(self, mode<font color="#909090">='r'</font>, bufsize<font color="#909090">=-1</font>)</dt><dd><tt><a href="#SocketType-makefile">makefile</a>([mode[, bufsize]]) -> file <a href="__builtin__.html#object">object</a><br>
- <br>
- Return a regular file <a href="__builtin__.html#object">object</a> corresponding to the <a href="#socket">socket</a>. The mode<br>
- and bufsize arguments are as for the built-in open() function.</tt></dd></dl>
- <dl><dt><a name="_socketobject-sendall"><strong>sendall</strong></a>(...)</dt><dd><tt><a href="#SocketType-sendall">sendall</a>(data[, flags])<br>
- <br>
- Send a data string to the <a href="#socket">socket</a>. For the optional flags<br>
- argument, see the Unix manual. This calls <a href="#SocketType-send">send</a>() repeatedly<br>
- until all data is sent. If an <a href="#error">error</a> occurs, it's impossible<br>
- to tell how much data has been sent.</tt></dd></dl>
- <dl><dt><a name="_socketobject-setblocking"><strong>setblocking</strong></a>(...)</dt><dd><tt><a href="#SocketType-setblocking">setblocking</a>(flag)<br>
- <br>
- Set the <a href="#socket">socket</a> to blocking (flag is true) or non-blocking (false).<br>
- <a href="#SocketType-setblocking">setblocking</a>(True) is equivalent to <a href="#SocketType-settimeout">settimeout</a>(None);<br>
- <a href="#SocketType-setblocking">setblocking</a>(False) is equivalent to <a href="#SocketType-settimeout">settimeout</a>(0.0).</tt></dd></dl>
- <dl><dt><a name="_socketobject-setsockopt"><strong>setsockopt</strong></a>(...)</dt><dd><tt><a href="#SocketType-setsockopt">setsockopt</a>(level, option, value)<br>
- <br>
- Set a <a href="#socket">socket</a> option. See the Unix manual for level and option.<br>
- The value argument can either be an integer or a string.</tt></dd></dl>
- <dl><dt><a name="_socketobject-settimeout"><strong>settimeout</strong></a>(...)</dt><dd><tt><a href="#SocketType-settimeout">settimeout</a>(<a href="#timeout">timeout</a>)<br>
- <br>
- Set a <a href="#timeout">timeout</a> on <a href="#socket">socket</a> operations. '<a href="#timeout">timeout</a>' can be a float,<br>
- giving in seconds, or None. Setting a <a href="#timeout">timeout</a> of None disables<br>
- the <a href="#timeout">timeout</a> feature and is equivalent to <a href="#SocketType-setblocking">setblocking</a>(1).<br>
- Setting a <a href="#timeout">timeout</a> of zero is the same as <a href="#SocketType-setblocking">setblocking</a>(0).</tt></dd></dl>
- <dl><dt><a name="_socketobject-shutdown"><strong>shutdown</strong></a>(...)</dt><dd><tt><a href="#SocketType-shutdown">shutdown</a>(flag)<br>
- <br>
- Shut down the reading side of the <a href="#socket">socket</a> (flag == SHUT_RD), the writing side<br>
- of the <a href="#socket">socket</a> (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>family</strong></dt>
- <dd><tt>the socket family</tt></dd>
- </dl>
- <dl><dt><strong>proto</strong></dt>
- <dd><tt>the socket protocol</tt></dd>
- </dl>
- <dl><dt><strong>recv</strong></dt>
- </dl>
- <dl><dt><strong>recv_into</strong></dt>
- </dl>
- <dl><dt><strong>recvfrom</strong></dt>
- </dl>
- <dl><dt><strong>recvfrom_into</strong></dt>
- </dl>
- <dl><dt><strong>send</strong></dt>
- </dl>
- <dl><dt><strong>sendto</strong></dt>
- </dl>
- <dl><dt><strong>type</strong></dt>
- <dd><tt>the socket type</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="error">class <strong>error</strong></a>(<a href="exceptions.html#IOError">exceptions.IOError</a>)</font></td></tr>
-
- <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt>Method resolution order:</dt>
- <dd><a href="socket.html#error">error</a></dd>
- <dd><a href="exceptions.html#IOError">exceptions.IOError</a></dd>
- <dd><a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a></dd>
- <dd><a href="exceptions.html#StandardError">exceptions.StandardError</a></dd>
- <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
- <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
- <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
- </dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><a name="error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl>
- <hr>
- Data and other attributes inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#error-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
- <hr>
- Methods inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><a name="error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
- <dl><dt><a name="error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><strong>errno</strong></dt>
- <dd><tt>exception errno</tt></dd>
- </dl>
- <dl><dt><strong>filename</strong></dt>
- <dd><tt>exception filename</tt></dd>
- </dl>
- <dl><dt><strong>strerror</strong></dt>
- <dd><tt>exception strerror</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><a name="error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
- <dl><dt><a name="error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
- <dl><dt><a name="error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
- <dl><dt><a name="error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
- <br>
- Use of negative indices is not supported.</tt></dd></dl>
- <dl><dt><a name="error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
- <dl><dt><a name="error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
- <dl><dt><a name="error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
- <dl><dt><a name="error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><strong>__dict__</strong></dt>
- </dl>
- <dl><dt><strong>args</strong></dt>
- </dl>
- <dl><dt><strong>message</strong></dt>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="gaierror">class <strong>gaierror</strong></a>(<a href="socket.html#error">error</a>)</font></td></tr>
-
- <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt>Method resolution order:</dt>
- <dd><a href="socket.html#gaierror">gaierror</a></dd>
- <dd><a href="socket.html#error">error</a></dd>
- <dd><a href="exceptions.html#IOError">exceptions.IOError</a></dd>
- <dd><a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a></dd>
- <dd><a href="exceptions.html#StandardError">exceptions.StandardError</a></dd>
- <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
- <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
- <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
- </dl>
- <hr>
- Data descriptors inherited from <a href="socket.html#error">error</a>:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><a name="gaierror-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl>
- <hr>
- Data and other attributes inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#gaierror-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
- <hr>
- Methods inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><a name="gaierror-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
- <dl><dt><a name="gaierror-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><strong>errno</strong></dt>
- <dd><tt>exception errno</tt></dd>
- </dl>
- <dl><dt><strong>filename</strong></dt>
- <dd><tt>exception filename</tt></dd>
- </dl>
- <dl><dt><strong>strerror</strong></dt>
- <dd><tt>exception strerror</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><a name="gaierror-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
- <dl><dt><a name="gaierror-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
- <dl><dt><a name="gaierror-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
- <dl><dt><a name="gaierror-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
- <br>
- Use of negative indices is not supported.</tt></dd></dl>
- <dl><dt><a name="gaierror-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
- <dl><dt><a name="gaierror-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#gaierror-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
- <dl><dt><a name="gaierror-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
- <dl><dt><a name="gaierror-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><strong>__dict__</strong></dt>
- </dl>
- <dl><dt><strong>args</strong></dt>
- </dl>
- <dl><dt><strong>message</strong></dt>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="herror">class <strong>herror</strong></a>(<a href="socket.html#error">error</a>)</font></td></tr>
-
- <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt>Method resolution order:</dt>
- <dd><a href="socket.html#herror">herror</a></dd>
- <dd><a href="socket.html#error">error</a></dd>
- <dd><a href="exceptions.html#IOError">exceptions.IOError</a></dd>
- <dd><a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a></dd>
- <dd><a href="exceptions.html#StandardError">exceptions.StandardError</a></dd>
- <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
- <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
- <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
- </dl>
- <hr>
- Data descriptors inherited from <a href="socket.html#error">error</a>:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><a name="herror-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl>
- <hr>
- Data and other attributes inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#herror-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
- <hr>
- Methods inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><a name="herror-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
- <dl><dt><a name="herror-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><strong>errno</strong></dt>
- <dd><tt>exception errno</tt></dd>
- </dl>
- <dl><dt><strong>filename</strong></dt>
- <dd><tt>exception filename</tt></dd>
- </dl>
- <dl><dt><strong>strerror</strong></dt>
- <dd><tt>exception strerror</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><a name="herror-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
- <dl><dt><a name="herror-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
- <dl><dt><a name="herror-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
- <dl><dt><a name="herror-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
- <br>
- Use of negative indices is not supported.</tt></dd></dl>
- <dl><dt><a name="herror-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
- <dl><dt><a name="herror-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#herror-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
- <dl><dt><a name="herror-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
- <dl><dt><a name="herror-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><strong>__dict__</strong></dt>
- </dl>
- <dl><dt><strong>args</strong></dt>
- </dl>
- <dl><dt><strong>message</strong></dt>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><strong>socket</strong> = <a name="socket">class _socketobject</a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt><a href="#socket">socket</a>([family[, type[, proto]]]) -> <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <br>
- Open a <a href="#socket">socket</a> of the given type. The family argument specifies the<br>
- address family; it defaults to AF_INET. The type argument specifies<br>
- whether this is a stream (SOCK_STREAM, this is the default)<br>
- or datagram (SOCK_DGRAM) <a href="#socket">socket</a>. The protocol argument defaults to 0,<br>
- specifying the default protocol. Keyword arguments are accepted.<br>
- <br>
- A <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> represents one endpoint of a network connection.<br>
- <br>
- Methods of <a href="#socket">socket</a> objects (keyword arguments not allowed):<br>
- <br>
- <a href="#socket-accept">accept</a>() -- accept a connection, returning new <a href="#socket">socket</a> and client address<br>
- <a href="#socket-bind">bind</a>(addr) -- bind the <a href="#socket">socket</a> to a local address<br>
- <a href="#socket-close">close</a>() -- close the <a href="#socket">socket</a><br>
- <a href="#socket-connect">connect</a>(addr) -- connect the <a href="#socket">socket</a> to a remote address<br>
- <a href="#socket-connect_ex">connect_ex</a>(addr) -- connect, return an <a href="#error">error</a> code instead of an exception<br>
- <a href="#socket-dup">dup</a>() -- return a new <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> identical to the current one [*]<br>
- <a href="#socket-fileno">fileno</a>() -- return underlying file descriptor<br>
- <a href="#socket-getpeername">getpeername</a>() -- return remote address [*]<br>
- <a href="#socket-getsockname">getsockname</a>() -- return local address<br>
- <a href="#socket-getsockopt">getsockopt</a>(level, optname[, buflen]) -- get <a href="#socket">socket</a> options<br>
- <a href="#socket-gettimeout">gettimeout</a>() -- return <a href="#timeout">timeout</a> or None<br>
- <a href="#socket-listen">listen</a>(n) -- start listening for incoming connections<br>
- <a href="#socket-makefile">makefile</a>([mode, [bufsize]]) -- return a file <a href="__builtin__.html#object">object</a> for the <a href="#socket">socket</a> [*]<br>
- <a href="#socket-recv">recv</a>(buflen[, flags]) -- receive data<br>
- <a href="#socket-recv_into">recv_into</a>(buffer[, nbytes[, flags]]) -- receive data (into a buffer)<br>
- <a href="#socket-recvfrom">recvfrom</a>(buflen[, flags]) -- receive data and sender's address<br>
- <a href="#socket-recvfrom_into">recvfrom_into</a>(buffer[, nbytes, [, flags])<br>
- -- receive data and sender's address (into a buffer)<br>
- <a href="#socket-sendall">sendall</a>(data[, flags]) -- send all data<br>
- <a href="#socket-send">send</a>(data[, flags]) -- send data, may not send all of it<br>
- <a href="#socket-sendto">sendto</a>(data[, flags], addr) -- send data to a given address<br>
- <a href="#socket-setblocking">setblocking</a>(0 | 1) -- set or clear the blocking I/O flag<br>
- <a href="#socket-setsockopt">setsockopt</a>(level, optname, value) -- set <a href="#socket">socket</a> options<br>
- <a href="#socket-settimeout">settimeout</a>(None | float) -- set or clear the <a href="#timeout">timeout</a><br>
- <a href="#socket-shutdown">shutdown</a>(how) -- shut down traffic in one or both directions<br>
- <br>
- [*] not available on all platforms!<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="_socketobject-__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>
- <dl><dt><a name="_socketobject-accept"><strong>accept</strong></a>(self)</dt><dd><tt><a href="#socket-accept">accept</a>() -> (<a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>, address info)<br>
- <br>
- Wait for an incoming connection. Return a new <a href="#socket">socket</a> representing the<br>
- connection, and the address of the client. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-bind"><strong>bind</strong></a>(...)</dt><dd><tt><a href="#socket-bind">bind</a>(address)<br>
- <br>
- Bind the <a href="#socket">socket</a> to a local address. For IP sockets, the address is a<br>
- pair (host, port); the host must refer to the local host. For raw packet<br>
- sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])</tt></dd></dl>
- <dl><dt><a name="_socketobject-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="#socket-close">close</a>()<br>
- <br>
- Close the <a href="#socket">socket</a>. It cannot be used after this call.</tt></dd></dl>
- <dl><dt><a name="_socketobject-connect"><strong>connect</strong></a>(...)</dt><dd><tt><a href="#socket-connect">connect</a>(address)<br>
- <br>
- Connect the <a href="#socket">socket</a> to a remote address. For IP sockets, the address<br>
- is a pair (host, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-connect_ex"><strong>connect_ex</strong></a>(...)</dt><dd><tt><a href="#socket-connect_ex">connect_ex</a>(address) -> errno<br>
- <br>
- This is like <a href="#socket-connect">connect</a>(address), but returns an <a href="#error">error</a> code (the errno value)<br>
- instead of raising an exception when an <a href="#error">error</a> occurs.</tt></dd></dl>
- <dl><dt><a name="_socketobject-dup"><strong>dup</strong></a>(self)</dt><dd><tt><a href="#socket-dup">dup</a>() -> <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <br>
- Return a new <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> connected to the same system resource.</tt></dd></dl>
- <dl><dt><a name="_socketobject-fileno"><strong>fileno</strong></a>(...)</dt><dd><tt><a href="#socket-fileno">fileno</a>() -> integer<br>
- <br>
- Return the integer file descriptor of the <a href="#socket">socket</a>.</tt></dd></dl>
- <dl><dt><a name="_socketobject-getpeername"><strong>getpeername</strong></a>(...)</dt><dd><tt><a href="#socket-getpeername">getpeername</a>() -> address info<br>
- <br>
- Return the address of the remote endpoint. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-getsockname"><strong>getsockname</strong></a>(...)</dt><dd><tt><a href="#socket-getsockname">getsockname</a>() -> address info<br>
- <br>
- Return the address of the local endpoint. For IP sockets, the address<br>
- info is a pair (hostaddr, port).</tt></dd></dl>
- <dl><dt><a name="_socketobject-getsockopt"><strong>getsockopt</strong></a>(...)</dt><dd><tt><a href="#socket-getsockopt">getsockopt</a>(level, option[, buffersize]) -> value<br>
- <br>
- Get a <a href="#socket">socket</a> option. See the Unix manual for level and option.<br>
- If a nonzero buffersize argument is given, the return value is a<br>
- string of that length; otherwise it is an integer.</tt></dd></dl>
- <dl><dt><a name="_socketobject-gettimeout"><strong>gettimeout</strong></a>(...)</dt><dd><tt><a href="#socket-gettimeout">gettimeout</a>() -> <a href="#timeout">timeout</a><br>
- <br>
- Returns the <a href="#timeout">timeout</a> in seconds (float) associated with <a href="#socket">socket</a> <br>
- operations. A <a href="#timeout">timeout</a> of None indicates that timeouts on <a href="#socket">socket</a> <br>
- operations are disabled.</tt></dd></dl>
- <dl><dt><a name="_socketobject-listen"><strong>listen</strong></a>(...)</dt><dd><tt><a href="#socket-listen">listen</a>(backlog)<br>
- <br>
- Enable a server to accept connections. The backlog argument must be at<br>
- least 0 (if it is lower, it is set to 0); it specifies the number of<br>
- unaccepted connections that the system will allow before refusing new<br>
- connections.</tt></dd></dl>
- <dl><dt><a name="_socketobject-makefile"><strong>makefile</strong></a>(self, mode<font color="#909090">='r'</font>, bufsize<font color="#909090">=-1</font>)</dt><dd><tt><a href="#socket-makefile">makefile</a>([mode[, bufsize]]) -> file <a href="__builtin__.html#object">object</a><br>
- <br>
- Return a regular file <a href="__builtin__.html#object">object</a> corresponding to the <a href="#socket">socket</a>. The mode<br>
- and bufsize arguments are as for the built-in open() function.</tt></dd></dl>
- <dl><dt><a name="_socketobject-sendall"><strong>sendall</strong></a>(...)</dt><dd><tt><a href="#socket-sendall">sendall</a>(data[, flags])<br>
- <br>
- Send a data string to the <a href="#socket">socket</a>. For the optional flags<br>
- argument, see the Unix manual. This calls <a href="#socket-send">send</a>() repeatedly<br>
- until all data is sent. If an <a href="#error">error</a> occurs, it's impossible<br>
- to tell how much data has been sent.</tt></dd></dl>
- <dl><dt><a name="_socketobject-setblocking"><strong>setblocking</strong></a>(...)</dt><dd><tt><a href="#socket-setblocking">setblocking</a>(flag)<br>
- <br>
- Set the <a href="#socket">socket</a> to blocking (flag is true) or non-blocking (false).<br>
- <a href="#socket-setblocking">setblocking</a>(True) is equivalent to <a href="#socket-settimeout">settimeout</a>(None);<br>
- <a href="#socket-setblocking">setblocking</a>(False) is equivalent to <a href="#socket-settimeout">settimeout</a>(0.0).</tt></dd></dl>
- <dl><dt><a name="_socketobject-setsockopt"><strong>setsockopt</strong></a>(...)</dt><dd><tt><a href="#socket-setsockopt">setsockopt</a>(level, option, value)<br>
- <br>
- Set a <a href="#socket">socket</a> option. See the Unix manual for level and option.<br>
- The value argument can either be an integer or a string.</tt></dd></dl>
- <dl><dt><a name="_socketobject-settimeout"><strong>settimeout</strong></a>(...)</dt><dd><tt><a href="#socket-settimeout">settimeout</a>(<a href="#timeout">timeout</a>)<br>
- <br>
- Set a <a href="#timeout">timeout</a> on <a href="#socket">socket</a> operations. '<a href="#timeout">timeout</a>' can be a float,<br>
- giving in seconds, or None. Setting a <a href="#timeout">timeout</a> of None disables<br>
- the <a href="#timeout">timeout</a> feature and is equivalent to <a href="#socket-setblocking">setblocking</a>(1).<br>
- Setting a <a href="#timeout">timeout</a> of zero is the same as <a href="#socket-setblocking">setblocking</a>(0).</tt></dd></dl>
- <dl><dt><a name="_socketobject-shutdown"><strong>shutdown</strong></a>(...)</dt><dd><tt><a href="#socket-shutdown">shutdown</a>(flag)<br>
- <br>
- Shut down the reading side of the <a href="#socket">socket</a> (flag == SHUT_RD), the writing side<br>
- of the <a href="#socket">socket</a> (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>family</strong></dt>
- <dd><tt>the socket family</tt></dd>
- </dl>
- <dl><dt><strong>proto</strong></dt>
- <dd><tt>the socket protocol</tt></dd>
- </dl>
- <dl><dt><strong>recv</strong></dt>
- </dl>
- <dl><dt><strong>recv_into</strong></dt>
- </dl>
- <dl><dt><strong>recvfrom</strong></dt>
- </dl>
- <dl><dt><strong>recvfrom_into</strong></dt>
- </dl>
- <dl><dt><strong>send</strong></dt>
- </dl>
- <dl><dt><strong>sendto</strong></dt>
- </dl>
- <dl><dt><strong>type</strong></dt>
- <dd><tt>the socket type</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="timeout">class <strong>timeout</strong></a>(<a href="socket.html#error">error</a>)</font></td></tr>
-
- <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt>Method resolution order:</dt>
- <dd><a href="socket.html#timeout">timeout</a></dd>
- <dd><a href="socket.html#error">error</a></dd>
- <dd><a href="exceptions.html#IOError">exceptions.IOError</a></dd>
- <dd><a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a></dd>
- <dd><a href="exceptions.html#StandardError">exceptions.StandardError</a></dd>
- <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
- <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
- <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
- </dl>
- <hr>
- Data descriptors inherited from <a href="socket.html#error">error</a>:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><a name="timeout-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl>
- <hr>
- Data and other attributes inherited from <a href="exceptions.html#IOError">exceptions.IOError</a>:<br>
- <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#timeout-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
- <hr>
- Methods inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><a name="timeout-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
- <dl><dt><a name="timeout-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#EnvironmentError">exceptions.EnvironmentError</a>:<br>
- <dl><dt><strong>errno</strong></dt>
- <dd><tt>exception errno</tt></dd>
- </dl>
- <dl><dt><strong>filename</strong></dt>
- <dd><tt>exception filename</tt></dd>
- </dl>
- <dl><dt><strong>strerror</strong></dt>
- <dd><tt>exception strerror</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><a name="timeout-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
- <dl><dt><a name="timeout-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
- <dl><dt><a name="timeout-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
- <dl><dt><a name="timeout-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
- <br>
- Use of negative indices is not supported.</tt></dd></dl>
- <dl><dt><a name="timeout-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
- <dl><dt><a name="timeout-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#timeout-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
- <dl><dt><a name="timeout-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
- <dl><dt><a name="timeout-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><strong>__dict__</strong></dt>
- </dl>
- <dl><dt><strong>args</strong></dt>
- </dl>
- <dl><dt><strong>message</strong></dt>
- </dl>
- </td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#eeaa77">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
-
- <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt><a name="-create_connection"><strong>create_connection</strong></a>(address, timeout<font color="#909090">=<object object></font>, source_address<font color="#909090">=None</font>)</dt><dd><tt>Connect to *address* and return the <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>.<br>
- <br>
- Convenience function. Connect to *address* (a 2-tuple ``(host,<br>
- port)``) and return the <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>. Passing the optional<br>
- *<a href="#timeout">timeout</a>* parameter will set the <a href="#timeout">timeout</a> on the <a href="#socket">socket</a> instance<br>
- before attempting to connect. If no *<a href="#timeout">timeout</a>* is supplied, the<br>
- global default <a href="#timeout">timeout</a> setting returned by :func:`getdefaulttimeout`<br>
- is used. If *source_address* is set it must be a tuple of (host, port)<br>
- for the <a href="#socket">socket</a> to bind as a source address before making the connection.<br>
- An host of '' or port 0 tells the OS to use the default.</tt></dd></dl>
- <dl><dt><a name="-fromfd"><strong>fromfd</strong></a>(...)</dt><dd><tt><a href="#-fromfd">fromfd</a>(fd, family, type[, proto]) -> <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a><br>
- <br>
- Create a <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a> from a duplicate of the given<br>
- file descriptor.<br>
- The remaining arguments are the same as for <a href="#socket">socket</a>().</tt></dd></dl>
- <dl><dt><a name="-getaddrinfo"><strong>getaddrinfo</strong></a>(...)</dt><dd><tt><a href="#-getaddrinfo">getaddrinfo</a>(host, port [, family, socktype, proto, flags])<br>
- -> list of (family, socktype, proto, canonname, sockaddr)<br>
- <br>
- Resolve host and port into addrinfo struct.</tt></dd></dl>
- <dl><dt><a name="-getdefaulttimeout"><strong>getdefaulttimeout</strong></a>(...)</dt><dd><tt><a href="#-getdefaulttimeout">getdefaulttimeout</a>() -> <a href="#timeout">timeout</a><br>
- <br>
- Returns the default <a href="#timeout">timeout</a> in seconds (float) for new <a href="#socket">socket</a> objects.<br>
- A value of None indicates that new <a href="#socket">socket</a> objects have no <a href="#timeout">timeout</a>.<br>
- When the <a href="#socket">socket</a> module is first imported, the default is None.</tt></dd></dl>
- <dl><dt><a name="-getfqdn"><strong>getfqdn</strong></a>(name<font color="#909090">=''</font>)</dt><dd><tt>Get fully qualified domain name from name.<br>
- <br>
- An empty argument is interpreted as meaning the local host.<br>
- <br>
- First the hostname returned by <a href="#-gethostbyaddr">gethostbyaddr</a>() is checked, then<br>
- possibly existing aliases. In case no FQDN is available, hostname<br>
- from <a href="#-gethostname">gethostname</a>() is returned.</tt></dd></dl>
- <dl><dt><a name="-gethostbyaddr"><strong>gethostbyaddr</strong></a>(...)</dt><dd><tt><a href="#-gethostbyaddr">gethostbyaddr</a>(host) -> (name, aliaslist, addresslist)<br>
- <br>
- Return the true host name, a list of aliases, and a list of IP addresses,<br>
- for a host. The host argument is a string giving a host name or IP number.</tt></dd></dl>
- <dl><dt><a name="-gethostbyname"><strong>gethostbyname</strong></a>(...)</dt><dd><tt><a href="#-gethostbyname">gethostbyname</a>(host) -> address<br>
- <br>
- Return the IP address (a string of the form '255.255.255.255') for a host.</tt></dd></dl>
- <dl><dt><a name="-gethostbyname_ex"><strong>gethostbyname_ex</strong></a>(...)</dt><dd><tt><a href="#-gethostbyname_ex">gethostbyname_ex</a>(host) -> (name, aliaslist, addresslist)<br>
- <br>
- Return the true host name, a list of aliases, and a list of IP addresses,<br>
- for a host. The host argument is a string giving a host name or IP number.</tt></dd></dl>
- <dl><dt><a name="-gethostname"><strong>gethostname</strong></a>(...)</dt><dd><tt><a href="#-gethostname">gethostname</a>() -> string<br>
- <br>
- Return the current host name.</tt></dd></dl>
- <dl><dt><a name="-getnameinfo"><strong>getnameinfo</strong></a>(...)</dt><dd><tt><a href="#-getnameinfo">getnameinfo</a>(sockaddr, flags) --> (host, port)<br>
- <br>
- Get host and port for a sockaddr.</tt></dd></dl>
- <dl><dt><a name="-getprotobyname"><strong>getprotobyname</strong></a>(...)</dt><dd><tt><a href="#-getprotobyname">getprotobyname</a>(name) -> integer<br>
- <br>
- Return the protocol number for the named protocol. (Rarely used.)</tt></dd></dl>
- <dl><dt><a name="-getservbyname"><strong>getservbyname</strong></a>(...)</dt><dd><tt><a href="#-getservbyname">getservbyname</a>(servicename[, protocolname]) -> integer<br>
- <br>
- Return a port number from a service name and protocol name.<br>
- The optional protocol name, if given, should be 'tcp' or 'udp',<br>
- otherwise any protocol will match.</tt></dd></dl>
- <dl><dt><a name="-getservbyport"><strong>getservbyport</strong></a>(...)</dt><dd><tt><a href="#-getservbyport">getservbyport</a>(port[, protocolname]) -> string<br>
- <br>
- Return the service name from a port number and protocol name.<br>
- The optional protocol name, if given, should be 'tcp' or 'udp',<br>
- otherwise any protocol will match.</tt></dd></dl>
- <dl><dt><a name="-htonl"><strong>htonl</strong></a>(...)</dt><dd><tt><a href="#-htonl">htonl</a>(integer) -> integer<br>
- <br>
- Convert a 32-bit integer from host to network byte order.</tt></dd></dl>
- <dl><dt><a name="-htons"><strong>htons</strong></a>(...)</dt><dd><tt><a href="#-htons">htons</a>(integer) -> integer<br>
- <br>
- Convert a 16-bit integer from host to network byte order.</tt></dd></dl>
- <dl><dt><a name="-inet_aton"><strong>inet_aton</strong></a>(...)</dt><dd><tt><a href="#-inet_aton">inet_aton</a>(string) -> packed 32-bit IP representation<br>
- <br>
- Convert an IP address in string format (123.45.67.89) to the 32-bit packed<br>
- binary format used in low-level network functions.</tt></dd></dl>
- <dl><dt><a name="-inet_ntoa"><strong>inet_ntoa</strong></a>(...)</dt><dd><tt><a href="#-inet_ntoa">inet_ntoa</a>(packed_ip) -> ip_address_string<br>
- <br>
- Convert an IP address from 32-bit packed binary format to string format</tt></dd></dl>
- <dl><dt><a name="-inet_ntop"><strong>inet_ntop</strong></a>(...)</dt><dd><tt><a href="#-inet_ntop">inet_ntop</a>(af, packed_ip) -> string formatted IP address<br>
- <br>
- Convert a packed IP address of the given family to string format.</tt></dd></dl>
- <dl><dt><a name="-inet_pton"><strong>inet_pton</strong></a>(...)</dt><dd><tt><a href="#-inet_pton">inet_pton</a>(af, ip) -> packed IP address string<br>
- <br>
- Convert an IP address from string format to a packed string suitable<br>
- for use with low-level network functions.</tt></dd></dl>
- <dl><dt><a name="-ntohl"><strong>ntohl</strong></a>(...)</dt><dd><tt><a href="#-ntohl">ntohl</a>(integer) -> integer<br>
- <br>
- Convert a 32-bit integer from network to host byte order.</tt></dd></dl>
- <dl><dt><a name="-ntohs"><strong>ntohs</strong></a>(...)</dt><dd><tt><a href="#-ntohs">ntohs</a>(integer) -> integer<br>
- <br>
- Convert a 16-bit integer from network to host byte order.</tt></dd></dl>
- <dl><dt><a name="-setdefaulttimeout"><strong>setdefaulttimeout</strong></a>(...)</dt><dd><tt><a href="#-setdefaulttimeout">setdefaulttimeout</a>(<a href="#timeout">timeout</a>)<br>
- <br>
- Set the default <a href="#timeout">timeout</a> in seconds (float) for new <a href="#socket">socket</a> objects.<br>
- A value of None indicates that new <a href="#socket">socket</a> objects have no <a href="#timeout">timeout</a>.<br>
- When the <a href="#socket">socket</a> module is first imported, the default is None.</tt></dd></dl>
- <dl><dt><a name="-socketpair"><strong>socketpair</strong></a>(...)</dt><dd><tt><a href="#-socketpair">socketpair</a>([family[, type[, proto]]]) -> (<a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>, <a href="#socket">socket</a> <a href="__builtin__.html#object">object</a>)<br>
- <br>
- Create a pair of <a href="#socket">socket</a> objects from the sockets returned by the platform<br>
- <a href="#-socketpair">socketpair</a>() function.<br>
- The arguments are the same as for <a href="#socket">socket</a>() except the default family is<br>
- AF_UNIX if defined on the platform; otherwise, the default is AF_INET.</tt></dd></dl>
- </td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#55aa55">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
-
- <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
- <td width="100%"><strong>AF_APPLETALK</strong> = 5<br>
- <strong>AF_ASH</strong> = 18<br>
- <strong>AF_ATMPVC</strong> = 8<br>
- <strong>AF_ATMSVC</strong> = 20<br>
- <strong>AF_AX25</strong> = 3<br>
- <strong>AF_BLUETOOTH</strong> = 31<br>
- <strong>AF_BRIDGE</strong> = 7<br>
- <strong>AF_DECnet</strong> = 12<br>
- <strong>AF_ECONET</strong> = 19<br>
- <strong>AF_INET</strong> = 2<br>
- <strong>AF_INET6</strong> = 10<br>
- <strong>AF_IPX</strong> = 4<br>
- <strong>AF_IRDA</strong> = 23<br>
- <strong>AF_KEY</strong> = 15<br>
- <strong>AF_LLC</strong> = 26<br>
- <strong>AF_NETBEUI</strong> = 13<br>
- <strong>AF_NETLINK</strong> = 16<br>
- <strong>AF_NETROM</strong> = 6<br>
- <strong>AF_PACKET</strong> = 17<br>
- <strong>AF_PPPOX</strong> = 24<br>
- <strong>AF_ROSE</strong> = 11<br>
- <strong>AF_ROUTE</strong> = 16<br>
- <strong>AF_SECURITY</strong> = 14<br>
- <strong>AF_SNA</strong> = 22<br>
- <strong>AF_TIPC</strong> = 30<br>
- <strong>AF_UNIX</strong> = 1<br>
- <strong>AF_UNSPEC</strong> = 0<br>
- <strong>AF_WANPIPE</strong> = 25<br>
- <strong>AF_X25</strong> = 9<br>
- <strong>AI_ADDRCONFIG</strong> = 32<br>
- <strong>AI_ALL</strong> = 16<br>
- <strong>AI_CANONNAME</strong> = 2<br>
- <strong>AI_NUMERICHOST</strong> = 4<br>
- <strong>AI_NUMERICSERV</strong> = 1024<br>
- <strong>AI_PASSIVE</strong> = 1<br>
- <strong>AI_V4MAPPED</strong> = 8<br>
- <strong>BDADDR_ANY</strong> = '00:00:00:00:00:00'<br>
- <strong>BDADDR_LOCAL</strong> = '00:00:00:FF:FF:FF'<br>
- <strong>BTPROTO_HCI</strong> = 1<br>
- <strong>BTPROTO_L2CAP</strong> = 0<br>
- <strong>BTPROTO_RFCOMM</strong> = 3<br>
- <strong>BTPROTO_SCO</strong> = 2<br>
- <strong>CAPI</strong> = <capsule object "_socket.CAPI"><br>
- <strong>EAI_ADDRFAMILY</strong> = -9<br>
- <strong>EAI_AGAIN</strong> = -3<br>
- <strong>EAI_BADFLAGS</strong> = -1<br>
- <strong>EAI_FAIL</strong> = -4<br>
- <strong>EAI_FAMILY</strong> = -6<br>
- <strong>EAI_MEMORY</strong> = -10<br>
- <strong>EAI_NODATA</strong> = -5<br>
- <strong>EAI_NONAME</strong> = -2<br>
- <strong>EAI_OVERFLOW</strong> = -12<br>
- <strong>EAI_SERVICE</strong> = -8<br>
- <strong>EAI_SOCKTYPE</strong> = -7<br>
- <strong>EAI_SYSTEM</strong> = -11<br>
- <strong>HCI_DATA_DIR</strong> = 1<br>
- <strong>HCI_FILTER</strong> = 2<br>
- <strong>HCI_TIME_STAMP</strong> = 3<br>
- <strong>INADDR_ALLHOSTS_GROUP</strong> = 3758096385<br>
- <strong>INADDR_ANY</strong> = 0<br>
- <strong>INADDR_BROADCAST</strong> = 4294967295<br>
- <strong>INADDR_LOOPBACK</strong> = 2130706433<br>
- <strong>INADDR_MAX_LOCAL_GROUP</strong> = 3758096639<br>
- <strong>INADDR_NONE</strong> = 4294967295<br>
- <strong>INADDR_UNSPEC_GROUP</strong> = 3758096384<br>
- <strong>IPPORT_RESERVED</strong> = 1024<br>
- <strong>IPPORT_USERRESERVED</strong> = 5000<br>
- <strong>IPPROTO_AH</strong> = 51<br>
- <strong>IPPROTO_DSTOPTS</strong> = 60<br>
- <strong>IPPROTO_EGP</strong> = 8<br>
- <strong>IPPROTO_ESP</strong> = 50<br>
- <strong>IPPROTO_FRAGMENT</strong> = 44<br>
- <strong>IPPROTO_GRE</strong> = 47<br>
- <strong>IPPROTO_HOPOPTS</strong> = 0<br>
- <strong>IPPROTO_ICMP</strong> = 1<br>
- <strong>IPPROTO_ICMPV6</strong> = 58<br>
- <strong>IPPROTO_IDP</strong> = 22<br>
- <strong>IPPROTO_IGMP</strong> = 2<br>
- <strong>IPPROTO_IP</strong> = 0<br>
- <strong>IPPROTO_IPIP</strong> = 4<br>
- <strong>IPPROTO_IPV6</strong> = 41<br>
- <strong>IPPROTO_NONE</strong> = 59<br>
- <strong>IPPROTO_PIM</strong> = 103<br>
- <strong>IPPROTO_PUP</strong> = 12<br>
- <strong>IPPROTO_RAW</strong> = 255<br>
- <strong>IPPROTO_ROUTING</strong> = 43<br>
- <strong>IPPROTO_RSVP</strong> = 46<br>
- <strong>IPPROTO_TCP</strong> = 6<br>
- <strong>IPPROTO_TP</strong> = 29<br>
- <strong>IPPROTO_UDP</strong> = 17<br>
- <strong>IPV6_CHECKSUM</strong> = 7<br>
- <strong>IPV6_DSTOPTS</strong> = 59<br>
- <strong>IPV6_HOPLIMIT</strong> = 52<br>
- <strong>IPV6_HOPOPTS</strong> = 54<br>
- <strong>IPV6_JOIN_GROUP</strong> = 20<br>
- <strong>IPV6_LEAVE_GROUP</strong> = 21<br>
- <strong>IPV6_MULTICAST_HOPS</strong> = 18<br>
- <strong>IPV6_MULTICAST_IF</strong> = 17<br>
- <strong>IPV6_MULTICAST_LOOP</strong> = 19<br>
- <strong>IPV6_NEXTHOP</strong> = 9<br>
- <strong>IPV6_PKTINFO</strong> = 50<br>
- <strong>IPV6_RECVDSTOPTS</strong> = 58<br>
- <strong>IPV6_RECVHOPLIMIT</strong> = 51<br>
- <strong>IPV6_RECVHOPOPTS</strong> = 53<br>
- <strong>IPV6_RECVPKTINFO</strong> = 49<br>
- <strong>IPV6_RECVRTHDR</strong> = 56<br>
- <strong>IPV6_RECVTCLASS</strong> = 66<br>
- <strong>IPV6_RTHDR</strong> = 57<br>
- <strong>IPV6_RTHDRDSTOPTS</strong> = 55<br>
- <strong>IPV6_RTHDR_TYPE_0</strong> = 0<br>
- <strong>IPV6_TCLASS</strong> = 67<br>
- <strong>IPV6_UNICAST_HOPS</strong> = 16<br>
- <strong>IPV6_V6ONLY</strong> = 26<br>
- <strong>IP_ADD_MEMBERSHIP</strong> = 35<br>
- <strong>IP_DEFAULT_MULTICAST_LOOP</strong> = 1<br>
- <strong>IP_DEFAULT_MULTICAST_TTL</strong> = 1<br>
- <strong>IP_DROP_MEMBERSHIP</strong> = 36<br>
- <strong>IP_HDRINCL</strong> = 3<br>
- <strong>IP_MAX_MEMBERSHIPS</strong> = 20<br>
- <strong>IP_MULTICAST_IF</strong> = 32<br>
- <strong>IP_MULTICAST_LOOP</strong> = 34<br>
- <strong>IP_MULTICAST_TTL</strong> = 33<br>
- <strong>IP_OPTIONS</strong> = 4<br>
- <strong>IP_RECVOPTS</strong> = 6<br>
- <strong>IP_RECVRETOPTS</strong> = 7<br>
- <strong>IP_RETOPTS</strong> = 7<br>
- <strong>IP_TOS</strong> = 1<br>
- <strong>IP_TTL</strong> = 2<br>
- <strong>MSG_CTRUNC</strong> = 8<br>
- <strong>MSG_DONTROUTE</strong> = 4<br>
- <strong>MSG_DONTWAIT</strong> = 64<br>
- <strong>MSG_EOR</strong> = 128<br>
- <strong>MSG_OOB</strong> = 1<br>
- <strong>MSG_PEEK</strong> = 2<br>
- <strong>MSG_TRUNC</strong> = 32<br>
- <strong>MSG_WAITALL</strong> = 256<br>
- <strong>NETLINK_DNRTMSG</strong> = 14<br>
- <strong>NETLINK_FIREWALL</strong> = 3<br>
- <strong>NETLINK_IP6_FW</strong> = 13<br>
- <strong>NETLINK_NFLOG</strong> = 5<br>
- <strong>NETLINK_ROUTE</strong> = 0<br>
- <strong>NETLINK_USERSOCK</strong> = 2<br>
- <strong>NETLINK_XFRM</strong> = 6<br>
- <strong>NI_DGRAM</strong> = 16<br>
- <strong>NI_MAXHOST</strong> = 1025<br>
- <strong>NI_MAXSERV</strong> = 32<br>
- <strong>NI_NAMEREQD</strong> = 8<br>
- <strong>NI_NOFQDN</strong> = 4<br>
- <strong>NI_NUMERICHOST</strong> = 1<br>
- <strong>NI_NUMERICSERV</strong> = 2<br>
- <strong>PACKET_BROADCAST</strong> = 1<br>
- <strong>PACKET_FASTROUTE</strong> = 6<br>
- <strong>PACKET_HOST</strong> = 0<br>
- <strong>PACKET_LOOPBACK</strong> = 5<br>
- <strong>PACKET_MULTICAST</strong> = 2<br>
- <strong>PACKET_OTHERHOST</strong> = 3<br>
- <strong>PACKET_OUTGOING</strong> = 4<br>
- <strong>PF_PACKET</strong> = 17<br>
- <strong>SHUT_RD</strong> = 0<br>
- <strong>SHUT_RDWR</strong> = 2<br>
- <strong>SHUT_WR</strong> = 1<br>
- <strong>SOCK_DGRAM</strong> = 2<br>
- <strong>SOCK_RAW</strong> = 3<br>
- <strong>SOCK_RDM</strong> = 4<br>
- <strong>SOCK_SEQPACKET</strong> = 5<br>
- <strong>SOCK_STREAM</strong> = 1<br>
- <strong>SOL_HCI</strong> = 0<br>
- <strong>SOL_IP</strong> = 0<br>
- <strong>SOL_SOCKET</strong> = 1<br>
- <strong>SOL_TCP</strong> = 6<br>
- <strong>SOL_TIPC</strong> = 271<br>
- <strong>SOL_UDP</strong> = 17<br>
- <strong>SOMAXCONN</strong> = 128<br>
- <strong>SO_ACCEPTCONN</strong> = 30<br>
- <strong>SO_BROADCAST</strong> = 6<br>
- <strong>SO_DEBUG</strong> = 1<br>
- <strong>SO_DONTROUTE</strong> = 5<br>
- <strong>SO_ERROR</strong> = 4<br>
- <strong>SO_KEEPALIVE</strong> = 9<br>
- <strong>SO_LINGER</strong> = 13<br>
- <strong>SO_OOBINLINE</strong> = 10<br>
- <strong>SO_RCVBUF</strong> = 8<br>
- <strong>SO_RCVLOWAT</strong> = 18<br>
- <strong>SO_RCVTIMEO</strong> = 20<br>
- <strong>SO_REUSEADDR</strong> = 2<br>
- <strong>SO_SNDBUF</strong> = 7<br>
- <strong>SO_SNDLOWAT</strong> = 19<br>
- <strong>SO_SNDTIMEO</strong> = 21<br>
- <strong>SO_TYPE</strong> = 3<br>
- <strong>TCP_CORK</strong> = 3<br>
- <strong>TCP_DEFER_ACCEPT</strong> = 9<br>
- <strong>TCP_INFO</strong> = 11<br>
- <strong>TCP_KEEPCNT</strong> = 6<br>
- <strong>TCP_KEEPIDLE</strong> = 4<br>
- <strong>TCP_KEEPINTVL</strong> = 5<br>
- <strong>TCP_LINGER2</strong> = 8<br>
- <strong>TCP_MAXSEG</strong> = 2<br>
- <strong>TCP_NODELAY</strong> = 1<br>
- <strong>TCP_QUICKACK</strong> = 12<br>
- <strong>TCP_SYNCNT</strong> = 7<br>
- <strong>TCP_WINDOW_CLAMP</strong> = 10<br>
- <strong>TIPC_ADDR_ID</strong> = 3<br>
- <strong>TIPC_ADDR_NAME</strong> = 2<br>
- <strong>TIPC_ADDR_NAMESEQ</strong> = 1<br>
- <strong>TIPC_CFG_SRV</strong> = 0<br>
- <strong>TIPC_CLUSTER_SCOPE</strong> = 2<br>
- <strong>TIPC_CONN_TIMEOUT</strong> = 130<br>
- <strong>TIPC_CRITICAL_IMPORTANCE</strong> = 3<br>
- <strong>TIPC_DEST_DROPPABLE</strong> = 129<br>
- <strong>TIPC_HIGH_IMPORTANCE</strong> = 2<br>
- <strong>TIPC_IMPORTANCE</strong> = 127<br>
- <strong>TIPC_LOW_IMPORTANCE</strong> = 0<br>
- <strong>TIPC_MEDIUM_IMPORTANCE</strong> = 1<br>
- <strong>TIPC_NODE_SCOPE</strong> = 3<br>
- <strong>TIPC_PUBLISHED</strong> = 1<br>
- <strong>TIPC_SRC_DROPPABLE</strong> = 128<br>
- <strong>TIPC_SUBSCR_TIMEOUT</strong> = 3<br>
- <strong>TIPC_SUB_CANCEL</strong> = 4<br>
- <strong>TIPC_SUB_PORTS</strong> = 1<br>
- <strong>TIPC_SUB_SERVICE</strong> = 2<br>
- <strong>TIPC_TOP_SRV</strong> = 1<br>
- <strong>TIPC_WAIT_FOREVER</strong> = -1<br>
- <strong>TIPC_WITHDRAWN</strong> = 2<br>
- <strong>TIPC_ZONE_SCOPE</strong> = 1<br>
- <strong>__all__</strong> = ['getfqdn', 'create_connection', 'AF_APPLETALK', 'AF_ASH', 'AF_ATMPVC', 'AF_ATMSVC', 'AF_AX25', 'AF_BLUETOOTH', 'AF_BRIDGE', 'AF_DECnet', 'AF_ECONET', 'AF_INET', 'AF_INET6', 'AF_IPX', 'AF_IRDA', 'AF_KEY', 'AF_LLC', 'AF_NETBEUI', 'AF_NETLINK', 'AF_NETROM', ...]<br>
- <strong>has_ipv6</strong> = True</td></tr></table>
- </body></html>