FD_SIZE and Maximum Number of Sockets an Application Can use in Windows

1.4k Views Asked by At

I am using a streaming server on windows which is hitting the 32 stream limit. Based on following article on msdn http://support.microsoft.com/kb/111855 we found out that reason is FD_SET size which is defaulted to 64 in winsock.

After increasing FD_SET size to 128 we are able to stream more channels.

The question is, 1. Is it safe to increase FD_SET size? 2. Does increasing FD_SET size guarantees socket availability? 3. Can FD_SIZE be set dynamically or only at compile time? Can we find what is max limit programmatically?

Thanks. M...

1

There are 1 best solutions below

0
On

In windows I have been successful in setting FD_SETSIZE to 32767.