Author pitrou
Recipients BreamoreBoy, gearb0x, jnoller, neologix, news1234, pitrou, python-dev
Date 2012-02-05.17:16:38
SpamBayes Score 5.35949e-08
Marked as misclassified No
Message-id <1328462040.3420.7.camel@localhost.localdomain>
In-reply-to <>
> Actually, it seems that even though the documentation doesn't mention
> sockets in TIME_WAIT state, SO_REUSEADDR is actually required on
> Windows:

According to that message, we would only need (or desire)

Note however what the MSDN doc says: “Conversely, a socket with the
SO_EXCLUSIVEADDRUSE set cannot necessarily be reused immediately after
socket closure. For example, if a listening socket with
SO_EXCLUSIVEADDRUSE set accepts a connection and is then subsequently
closed, another socket (also with SO_EXCLUSIVEADDRUSE) cannot bind to
the same port as the first socket until the original connection becomes

... and goes on to discuss the virtues of shutdown() etc.

So I still think we need no option at all under Windows, and
SO_EXCLUSIVEADDR actually prevents the behaviour we are trying to avoid.

> So the proper solution is the one adopted by support.bind_port(),

I think you read it wrong. bind_port() only uses SO_EXCLUSIVEADDRUSE and
Not surprising considering the commentor above, Trent, is the same that
wrote the bind_port() code :)
Date User Action Args
2012-02-05 17:16:39pitrousetrecipients: + pitrou, jnoller, news1234, neologix, BreamoreBoy, python-dev, gearb0x
2012-02-05 17:16:38pitroulinkissue8184 messages
2012-02-05 17:16:38pitroucreate