Index: Doc/library/asynchat.rst =================================================================== --- Doc/library/asynchat.rst (revision 74791) +++ Doc/library/asynchat.rst (working copy) @@ -62,12 +62,16 @@ an important breakpoint in, an incoming transmission from the remote endpoint. - To build a functioning :class:`async_chat` subclass your input methods + To build a functioning :class:`async_chat` subclass your input methods :meth:`collect_incoming_data` and :meth:`found_terminator` must handle the data that the channel receives asynchronously. The methods are described below. + .. versionchanged:: 2.6 + Added the *map* parameter to the constructor and renamed *conn* to + *sock*, rendering it identical to :class:`asyncore.dispatcher`. + .. method:: async_chat.close_when_done() Pushes a ``None`` on to the producer fifo. When this producer is popped off @@ -83,10 +87,12 @@ .. method:: async_chat._collect_incoming_data(data) - Sample implementation of a data collection rutine to be used in conjunction + Sample implementation of a data collection routine to be used in conjunction with :meth:`_get_data` in a user-specified :meth:`found_terminator`. + .. versionadded:: 2.6 + .. method:: async_chat.discard_buffers() In emergencies this method will discard any data held in the input and/or @@ -95,7 +101,7 @@ .. method:: async_chat.found_terminator() - Called when the incoming data stream matches the termination condition set + Called when the incoming data stream matches the termination condition set by :meth:`set_terminator`. The default method, which must be overridden, raises a :exc:`NotImplementedError` exception. The buffered input data should be available via an instance attribute. @@ -106,7 +112,9 @@ Will return and clear the data received with the sample :meth:`_collect_incoming_data` implementation. + .. versionadded:: 2.6 + .. method:: async_chat.get_terminator() Returns the current terminator for the channel.