~pythonregexp2.7/python/issue2636-11

« back to all changes in this revision

Viewing changes to Doc/library/asyncore.rst

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-21 13:47:31 UTC
  • mfrom: (39021.1.404 Regexp-2.7)
  • mto: This revision was merged to the branch mainline in revision 39030.
  • Revision ID: darklord@timehorse.com-20080921134731-rudomuzeh1b2tz1y
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
      flushed).  Sockets are automatically closed when they are
223
223
      garbage-collected.
224
224
 
 
225
.. class:: file_dispatcher()
 
226
 
 
227
   A file_dispatcher takes a file descriptor or file object along with an
 
228
   optional map argument and wraps it for use with the :cfunc:`poll` or
 
229
   :cfunc:`loop` functions.  If provided a file object or anything with a
 
230
   :cfunc:`fileno` method, that method will be called and passed to the
 
231
   :class:`file_wrapper` constructor.  Availability: UNIX.
 
232
 
 
233
.. class:: file_wrapper()
 
234
 
 
235
   A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to
 
236
   duplicate the handle so that the original handle may be closed independently
 
237
   of the file_wrapper.  This class implements sufficient methods to emulate a
 
238
   socket for use by the :class:`file_dispatcher` class.  Availability: UNIX.
 
239
 
225
240
 
226
241
.. _asyncore-example:
227
242