diff options
author | Giampaolo RodolĂ <g.rodola@gmail.com> | 2011-02-25 14:54:07 (GMT) |
---|---|---|
committer | Giampaolo RodolĂ <g.rodola@gmail.com> | 2011-02-25 14:54:07 (GMT) |
commit | fb9a9c8f2ff4ba2de7be7e01bd6486d28be11c19 (patch) | |
tree | c5b4c67806143cb1ef896f02625ff477c4bf8f3d /Doc/library/asyncore.rst | |
parent | 29eb90a69d039a12f2f08e1c06c51cc6e8efb9ee (diff) | |
download | cpython-fb9a9c8f2ff4ba2de7be7e01bd6486d28be11c19.zip cpython-fb9a9c8f2ff4ba2de7be7e01bd6486d28be11c19.tar.gz cpython-fb9a9c8f2ff4ba2de7be7e01bd6486d28be11c19.tar.bz2 |
Merged revisions 88581 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88581 | giampaolo.rodola | 2011-02-25 15:50:57 +0100 (ven, 25 feb 2011) | 1 line
(issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi)
........
Diffstat (limited to 'Doc/library/asyncore.rst')
-rw-r--r-- | Doc/library/asyncore.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index b168ca7..54dd249 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -309,7 +309,7 @@ implement its socket handling:: asyncore Example basic echo server ---------------------------------- -Here is abasic echo server that uses the :class:`dispatcher` class to accept +Here is a basic echo server that uses the :class:`dispatcher` class to accept connections and dispatches the incoming connections to a handler:: import asyncore @@ -319,7 +319,8 @@ connections and dispatches the incoming connections to a handler:: def handle_read(self): data = self.recv(8192) - self.send(data) + if data: + self.send(data) class EchoServer(asyncore.dispatcher): |