diff options
author | Josiah Carlson <josiah.carlson@gmail.com> | 2008-07-07 04:15:08 (GMT) |
---|---|---|
committer | Josiah Carlson <josiah.carlson@gmail.com> | 2008-07-07 04:15:08 (GMT) |
commit | d74900ebb5a22b387b49684990da1925e1d6bdc9 (patch) | |
tree | 2bdffc475f22a3db675656e49458f74ebfc39951 /Doc/library/asyncore.rst | |
parent | d51ee54a232f4986abd18a4113f3af1158c2fd53 (diff) | |
download | cpython-d74900ebb5a22b387b49684990da1925e1d6bdc9.zip cpython-d74900ebb5a22b387b49684990da1925e1d6bdc9.tar.gz cpython-d74900ebb5a22b387b49684990da1925e1d6bdc9.tar.bz2 |
Committing Py3k version of changelist 64080 and 64257, along with updated tests
for smtpd, which required updating with the new semantics.
Diffstat (limited to 'Doc/library/asyncore.rst')
-rw-r--r-- | Doc/library/asyncore.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index 7242e73..658c8ea 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -222,6 +222,21 @@ any that have been added to the map during asynchronous service) is closed. flushed). Sockets are automatically closed when they are garbage-collected. +.. class:: file_dispatcher() + + A file_dispatcher takes a file descriptor or file object along with an + optional map argument and wraps it for use with the :cfunc:`poll` or + :cfunc:`loop` functions. If provided a file object or anything with a + :cfunc:`fileno` method, that method will be called and passed to the + :class:`file_wrapper` constructor. Availability: UNIX. + +.. class:: file_wrapper() + + A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to + duplicate the handle so that the original handle may be closed independently + of the file_wrapper. This class implements sufficient methods to emulate a + socket for use by the :class:`file_dispatcher` class. Availability: UNIX. + .. _asyncore-example: |