diff options
author | Ryan Williams <rdw@lindenlab.com> | 2010-01-10 16:21:38 -0800 |
---|---|---|
committer | Ryan Williams <rdw@lindenlab.com> | 2010-01-10 16:21:38 -0800 |
commit | e53360cacd482381712f88bf52983d8475cae048 (patch) | |
tree | a3e2c859818ff4b2653b055b2469a04a47612056 /examples | |
parent | 3448d83355a6f2801467a1a1e0995de38f244a86 (diff) | |
download | eventlet-e53360cacd482381712f88bf52983d8475cae048.tar.gz |
Added docs on max_http_version which mention its purpose of killing keepalives, improved wsgi docs with the example code.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wsgi.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/wsgi.py b/examples/wsgi.py index 150fead..93469fd 100644 --- a/examples/wsgi.py +++ b/examples/wsgi.py @@ -5,8 +5,8 @@ multiple threads, and graceful code reloading, see: http://pypi.python.org/pypi/Spawning/ """ -from eventlet import api, wsgi - +from eventlet import wsgi +from eventlet.green import socket def hello_world(env, start_response): if env['PATH_INFO'] != '/': @@ -14,7 +14,9 @@ def hello_world(env, start_response): return ['Not Found\r\n'] start_response('200 OK', [('Content-Type', 'text/plain')]) return ['Hello, World!\r\n'] + +sock = socket.socket() +sock.bind(('', 8090)) +sock.listen(500) - -wsgi.server(api.tcp_listener(('', 8080)), hello_world) - +wsgi.server(sock, hello_world) |