[issue27392] Add a server_side keyword parameter to create_connection

Jim Fulton report at bugs.python.org
Wed Jun 29 09:56:57 EDT 2016


Jim Fulton added the comment:

Guido, IMO, there's value in having the ability to accept connections independently of handling them.

It wasn't clear to me from reading the documentation that create_connection is only meant for making client connections, especially given that it can take an already connected socket.  It works well for non-SSL server sockets and would work for SSL with a trivial change.

This issue was discussed on the tulip list or issue tracker a couple of years ago. (Sorry, I can't find the link ATM.) I think it was dismissed because no one felt like looking into it and because you asserted that it makes no sense to use an async library when handling each connection in a separate thread.

IMO, async loop is useful even for a single connection when reading and writing are not purely synchronous. In ZEO it's very useful that that the server can send data to a client independent of requests the client is making.  (Technically, under the hood this often means that there are really 2 I/O channels, the client's TCP connection and whatever mechanism the loop uses to allow itself to be woken asynchronously as in call_soon_threadsafe.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27392>
_______________________________________


More information about the Python-bugs-list mailing list