We help IT Professionals succeed at work.

Limits on the number of TCPIP Sockets one process can use?

mellor
mellor asked
on
Medium Priority
214 Views
Last Modified: 2013-12-14
I find that on NT 4 and 2000 one process can use 64 sockets (Using winsock 1.1). Is there any way to increase this so I can listen out on say 100 ports?
I have rebuilt by project defining FD_SETSIZE to 200 but this has made no difference. I expect there is a registry setting to change as well?
Yours
Allan
Comment
Watch Question

Commented:
I presume you're getting a WSAEMFILE error.

What does WSADATA.iMaxSockets give you after WSAStartup()?

I get 32767 for 1.1.

Given that I find nothing in the registry limiting IP sockets (there IS for SPX/IPX) and I know of several apps that open hundreds of simultaneous sockets, I am tempted to suspect that the limit you're hitting is something else.

Author

Commented:
I also get 32767 for 1.1 (0 at 2.0).
I thing you are right and I'm hitting another limit.
Thanks for replying

Commented:
BTW, the 0 for 2.0 is its' way of saying unlimited, although an unrealistically high figure like 32767 does give me slightly warmer fuzzies.

Commented:
I meant to also add that if you plan on usinig any of the FD_SET structures, you WILL have to re-define FD_SETSIZE if you want to save info on more than 64 sockets.

ciao...

Author

Commented:
Thanks for comments.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.