diff options
author | donovan <donovan@bigass.local> | 2008-05-22 07:35:09 -0700 |
---|---|---|
committer | donovan <donovan@bigass.local> | 2008-05-22 07:35:09 -0700 |
commit | a9f9486f896d2771c3356eea406f921030e7bcef (patch) | |
tree | 5ccdb7b5106b3aba96d0c7a51648d9c082c5d21b /examples | |
parent | 3991daef04adf8940e9ddcfe8bc63cd7fc20c6f6 (diff) | |
download | eventlet-a9f9486f896d2771c3356eea406f921030e7bcef.tar.gz |
merge up to svn branch r120
Diffstat (limited to 'examples')
-rw-r--r-- | examples/echoserver.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/echoserver.py b/examples/echoserver.py index 3fe0191..8c1813a 100644 --- a/examples/echoserver.py +++ b/examples/echoserver.py @@ -32,7 +32,7 @@ THE SOFTWARE. from eventlet import api -def handle_socket(client): +def handle_socket(reader, writer): print "client connected" while True: # pass through every non-eof line @@ -47,6 +47,6 @@ server = api.tcp_listener(('0.0.0.0', 6000)) while True: new_sock, address = server.accept() # handle every new connection with a new coroutine - api.spawn(handle_socket, new_sock) + api.spawn(handle_socket, new_sock.makefile('r'), new_sock.makefile('w')) server.close() |