[issue25749] asyncio.Server class documented but not exported

Ron Frederick report at bugs.python.org
Wed Dec 20 22:32:58 EST 2017


Ron Frederick <ronf at timeheart.net> added the comment:

Thanks. Unfortunately, in the case of the way SSH listeners with dynamic ports, the protocol only allows a single port number to be returned. So, when binding on multiple interfaces there's a requirement that the SAME port be chosen for all of the socket bindings, which can't easily be done today with a single asyncio.Server object. That's a bit off-topic for this issue, though.

Regarding exposing the sockets, it would never really make sense to directly call send() on a listening socket, and I can see why it also wouldn't make sense to allow calling accept(). I'm really not sure there's ANY call other than getsockaddr() that really makes sense here, though, so perhaps it would be better to evolve the API in AbstractServer into returning a list of sockaddr tuples rather than sockets.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25749>
_______________________________________


More information about the Python-bugs-list mailing list