[Spread-users] [BUG][PATCH] fd to session troubles

Guido van Rossum guido at python.org
Sun Feb 3 15:55:46 EST 2002

> So you are saying if we add a line 
> #define FD_SETSIZE 1024 
> in the Windows section of our arch.h, then windows select will work with
> 1024 sockets at once?


> I just want to verify it because it seems like the
> windows libc/equivelent might have it's own compiled in knowledge of the
> size of the fd_set struct and think it is only 64. 

We've been using this in Python successfully for years.  The library
has no built-in knowledge of the limit; the header file does but the
value that an app picks up from the header file will be communicated
to the library on each call.

> The way I can imagine this working, is that the libc just looks at fd_count
> and trusts that the fd_array array is big enough to hold all the sockets
> the apps says are in it.  If it isn't, then that is the application's fault
> and the app will crash (ok), but as long as the app is ok, then the system
> is as well.

I think that's how it works.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Spread-users mailing list