Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7095721

Browse files
committed
Mention asyncore and Twisted in the library FAQ.
1 parent 11480b6 commit 7095721

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/faq/library.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,8 @@ some sample code::
757757
How do I avoid blocking in the connect() method of a socket?
758758
------------------------------------------------------------
759759

760-
The select module is commonly used to help with asynchronous I/O on sockets.
760+
The :mod:`select` module is commonly used to help with asynchronous I/O on
761+
sockets.
761762

762763
To prevent the TCP connect from blocking, you can set the socket to non-blocking
763764
mode. Then when you do the ``connect()``, you will either connect immediately
@@ -771,6 +772,12 @@ just return the errno value. To poll, you can call ``connect_ex()`` again later
771772
-- ``0`` or ``errno.EISCONN`` indicate that you're connected -- or you can pass this
772773
socket to select to check if it's writable.
773774

775+
.. note::
776+
The :mod:`asyncore` module presents a framework-like approach to the problem
777+
of writing non-blocking networking code.
778+
The third-party `Twisted <http://twistedmatrix.com/>`_ library is
779+
a popular and feature-rich alternative.
780+
774781

775782
Databases
776783
=========

0 commit comments

Comments
 (0)