Commit 470f7729 authored by Giampaolo Rodolà's avatar Giampaolo Rodolà

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)
........
parent 4e5ce6c7
...@@ -292,7 +292,7 @@ implement its socket handling:: ...@@ -292,7 +292,7 @@ implement its socket handling::
asyncore Example basic echo server 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:: connections and dispatches the incoming connections to a handler::
import asyncore import asyncore
...@@ -302,7 +302,8 @@ connections and dispatches the incoming connections to a handler:: ...@@ -302,7 +302,8 @@ connections and dispatches the incoming connections to a handler::
def handle_read(self): def handle_read(self):
data = self.recv(8192) data = self.recv(8192)
self.send(data) if data:
self.send(data)
class EchoServer(asyncore.dispatcher): class EchoServer(asyncore.dispatcher):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment