[Python-Dev] Asyncore .set_reuse_addr() on Windows
Jeff Epler
jepler at unpythonic.net
Tue Aug 10 15:26:13 CEST 2004
Do any systems *but* win32 have SO_EXLUSIVEADDRUSE ? (and if they do,
is it better than SO_REUSEADDR for the same reasons it is on win32?)
.. so why not write
if hasattr(socket, 'SO_EXCLUSIVEADDRUSE'):
reuse_constant = socket.SO_EXCLUSIVEADDRUSE
else:
reuse_constant = socket.SO_REUSEADDR
SO_EXCLUSIVEADDRUSE sounds like the exact opposite of SO_REUSEADDR,
according to a page I found when trying to find out whether any other
platform has SO_EXCLUSEIVEADDRUSE:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/using_so_exclusiveaddruse.asp
.. SO_REUSEADDR's semantics on Windows are apparently different from
Unix, but SO_EXCLUSEIVEADDRUSE is different still.
I'm no win32-platform programmer, just trying to make sense of what I
read on the web.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040810/2fd33ee5/attachment.pgp
More information about the Python-Dev
mailing list