[Python-Dev] Pervasive socket failures on Windows (original) (raw)

Tim Peters tim.peters at gmail.com
Fri Feb 10 22:55:18 CET 2006


[Martin v. Löwis]

So FDSETSIZE is 64 on Windows,

[Tim Peters]

In Python FDSETSIZE is 512 on Windows (see the top of selectmodule.c).

[Scott Dial]

Although I agree, in terms of the socketmodule, there was no such define overriding the default FDSETSIZE, so you are both right.

? Sorrry, don't know what you're talking about here. Python's selectmodule.c #defines FD_SETSIZE before it includes winsock.h on Windows, so Microsoft's default is irrelevant to Python. The reason selectmodule.c uses "!defined(FD_SETSIZE)" in its

#if defined(MS_WINDOWS) && !defined(FD_SETSIZE) #define FD_SETSIZE 512 #endif

is explained in the comment right before that code.



More information about the Python-Dev mailing list