[Python-Dev] Asyncore .set_reuse_addr() on Windows

A.M. Kuchling amk at amk.ca
Sat Aug 7 16:23:27 CEST 2004


A recent patch makes asyncore.py's .set_reuse_addr method work on Windows, 
which needs a different socket option:

            if sys.platform == 'win32':
                reuse_constant = socket.SO_EXCLUSIVEADDRUSE
            else:
                reuse_constant = socket.SO_REUSEADDR

Question: should the condition be sys.platform.startswith('win') for
the sake of win64, or other Windows variants?  (I don't know which
values sys.platform can have on Windows.)

--amk


More information about the Python-Dev mailing list

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant