diff options
author | Josiah Carlson <josiah.carlson@gmail.com> | 2008-06-10 05:00:08 (GMT) |
---|---|---|
committer | Josiah Carlson <josiah.carlson@gmail.com> | 2008-06-10 05:00:08 (GMT) |
commit | 1a72d88abf90edd72a9baf0fd6eebea2cded89c5 (patch) | |
tree | 3f7fe414a21a6021b9fbeaa8c514672302718d6f /Doc | |
parent | 602d8db2bc5ddc9a2de2843df92db53365478b3d (diff) | |
download | cpython-1a72d88abf90edd72a9baf0fd6eebea2cded89c5.zip cpython-1a72d88abf90edd72a9baf0fd6eebea2cded89c5.tar.gz cpython-1a72d88abf90edd72a9baf0fd6eebea2cded89c5.tar.bz2 |
Applying updated patch from Issue 1736190, which addresses partial
issues in: 909005 and 17361001, as well as completely as possible issues
539444, 760475, 777588, 889153, 953599, 1025525, 1063924, and 658749.
This patch also includes doc and test updates as necessary.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asynchat.rst | 12 | ||||
-rw-r--r-- | Doc/library/asyncore.rst | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst index 6f15441..ff6432e 100644 --- a/Doc/library/asynchat.rst +++ b/Doc/library/asynchat.rst @@ -81,6 +81,12 @@ connection requests. :exc:`NotImplementedError` exception. +.. method:: async_chat._collect_incoming_data(data) + + Sample implementation of a data collection rutine to be used in conjunction + with :meth:`_get_data` in a user-specified :meth:`found_terminator`. + + .. method:: async_chat.discard_buffers() In emergencies this method will discard any data held in the input and/or @@ -95,6 +101,12 @@ connection requests. should be available via an instance attribute. +.. method:: async_chat._get_data() + + Will return and clear the data received with the sample + :meth:`_collect_incoming_data` implementation. + + .. method:: async_chat.get_terminator() Returns the current terminator for the channel. diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index da94a9b..e40f507 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -222,6 +222,20 @@ 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 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 file_dispatcher class. + Availability: UNIX .. _asyncore-example: |