[Python-checkins] r88344 - python/branches/py3k/Doc/faq/library.rst
antoine.pitrou
python-checkins at python.org
Sat Feb 5 12:24:15 CET 2011
Author: antoine.pitrou
Date: Sat Feb 5 12:24:15 2011
New Revision: 88344
Log:
Mention asyncore and Twisted in the library FAQ.
Modified:
python/branches/py3k/Doc/faq/library.rst
Modified: python/branches/py3k/Doc/faq/library.rst
==============================================================================
--- python/branches/py3k/Doc/faq/library.rst (original)
+++ python/branches/py3k/Doc/faq/library.rst Sat Feb 5 12:24:15 2011
@@ -757,7 +757,8 @@
How do I avoid blocking in the connect() method of a socket?
------------------------------------------------------------
-The select module is commonly used to help with asynchronous I/O on sockets.
+The :mod:`select` module is commonly used to help with asynchronous I/O on
+sockets.
To prevent the TCP connect from blocking, you can set the socket to non-blocking
mode. Then when you do the ``connect()``, you will either connect immediately
@@ -771,6 +772,12 @@
-- ``0`` or ``errno.EISCONN`` indicate that you're connected -- or you can pass this
socket to select to check if it's writable.
+.. note::
+ The :mod:`asyncore` module presents a framework-like approach to the problem
+ of writing non-blocking networking code.
+ The third-party `Twisted <http://twistedmatrix.com/>`_ library is
+ a popular and feature-rich alternative.
+
Databases
=========
More information about the Python-checkins
mailing list