This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients giampaolo.rodola, gvanrossum, neologix, pitrou
Date 2013-03-27.18:39:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think that's a good idea.

However, there's a problem with the implementation: if one passes "" or None as address on a dual-stack node, the resulting socket will be either IPv4 bound to INADDR_ANY, or IPv6 bound to IN6ADDR_ANY, whereas one would expect to be bound both in IPv4 and IPv6. In the later case, some platforms (like Linux) use IPv4-mapped addresses by default, some others (e.g. some versions of FreeBSD) don't. So, depending on IPV6_V6ONLY setting, binding to IPV6 any won't accept IPv4 connections. Also, some platforms don't support mapped addresses at all, so the only portable solution is to bind both to and ::, whith two different sockets, and use select() to accept both.

So it would maybe make sense to expose a ServerSocket class, with an accept method which would do the right thing (as an added bonus, it could expose set_reuse_addr(bool), since SO_REUSEADDR have subtle semantic differences between Unix and Windows).
Date User Action Args
2013-03-27 18:39:41neologixsetrecipients: + neologix, gvanrossum, pitrou, giampaolo.rodola
2013-03-27 18:39:41neologixsetmessageid: <>
2013-03-27 18:39:41neologixlinkissue17561 messages
2013-03-27 18:39:40neologixcreate