[issue17561] Add socket.create_server_sock() convenience function

Giampaolo Rodola' report at bugs.python.org
Fri Mar 29 03:14:25 CET 2013


Giampaolo Rodola' added the comment:

I managed to write a container class which listens on multiples addresses and uses select/poll on accept() as suggested by Charles.
FWICT it seems to work pretty well and supports non-blocking sockets and timeouts (tested on Linux, Windows and OSX).

It is available as a recipe here:
http://code.activestate.com/recipes/578504

IMO has_dual_stack() and create_server_sock() functions can already be included as-is (will adapt the recipe in order to get rid of Python 2.X support and submit another patch).

As for including also MultipleSocketsListener that's debatable.
It can either be added or linked/mentioned it in the doc.

----------

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


More information about the Python-bugs-list mailing list