<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
22.05.2012 10:38, Sylvain Hellegouarch kirjoitti:
<blockquote
cite="mid:CALkdAki1vJqgme5RX-SNEgaRJ+J9JgKv_7Mqye3CPy+nQKLNrg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
In other words: The responsibility for the connection (and
socket) is<br>
passed to the application.<br>
<br>
This works well with traditional threaded servers. The
application can<br>
spawn a new worker thread, put the job into a queue or
whatever and then<br>
return from the application callable, allowing the server
thread to<br>
continue handling new connections. <br>
<br>
</blockquote>
</div>
<div><br>
</div>
This is exactly how ws4py was implemented when using CherryPy for
the HTTP server performing the handshake [1]. There's also a WSGI
middleware [2] but it's heavily geared towards gevent and may not
be reusable easily elsewhere I'm afraid.<br clear="all">
</blockquote>
It's also a hack that violates the WSGI spec. It's also not usable
through reverse proxying or FCGI/SCGI.<br>
<blockquote
cite="mid:CALkdAki1vJqgme5RX-SNEgaRJ+J9JgKv_7Mqye3CPy+nQKLNrg@mail.gmail.com"
type="cite">
<div><br>
</div>
-- <br>
- Sylvain<br>
<a moz-do-not-send="true" href="http://www.defuze.org">http://www.defuze.org</a><br>
<a moz-do-not-send="true" href="http://twitter.com/lawouach">http://twitter.com/lawouach</a><br>
<div><br>
</div>
<div>[1] <a moz-do-not-send="true"
href="https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/server/cherrypyserver.py">https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/server/cherrypyserver.py</a></div>
<div>[2] <a moz-do-not-send="true"
href="https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/server/wsgi/middleware.py">https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/server/wsgi/middleware.py</a></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Web-SIG mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Web-SIG@python.org">Web-SIG@python.org</a>
Web SIG: <a class="moz-txt-link-freetext" href="http://www.python.org/sigs/web-sig">http://www.python.org/sigs/web-sig</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/options/web-sig/alex.gronholm%40nextday.fi">http://mail.python.org/mailman/options/web-sig/alex.gronholm%40nextday.fi</a>
</pre>
</blockquote>
<br>
</body>
</html>