🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OS limits on incoming socket connections

Started by
11 comments, last by Shed 22 years, 5 months ago
Greetings all! I''ve recently become interested in the idea of writing some kind of multiplayer persistant world game, so I bought WordWare''s book on multiplayer game programming. One of the authors mentioned in passing that different operating systems have internal limits on how many sockets a server can be listening on at once. He went further to say that for some operating systems, this number may be as low as 5 or 6. Obviously, if I wanted to use streaming sockets, I''d run out of sockets fast on the server side. How do you guys get around this? Is this only a winsock thing? Why are these arbitrary software limits imposed on us? Does DPlay have similar limits? My current thinking to get around this problem is just to use UDP and send all the packets to the same server socket and let the server program sort it all out. I only have access to win98 and 2000 machines for use as potential game servers, so while Unix may in most cases be the answer, it isn''t here. Thanks for any input
-"Let be be finale of seem, seems to me"
Advertisement
I never heard such a thing (although that hardly means it isn''t true). What OSes did the author say had such a limitation?
I''ve had 50+ sockets open on Win98 before (no, I didn''t make anything good, I was just playing around) with no problems.
As I understand it, MS operating systems have a limitation by thread, although I''m not sure of the exact limit. I think I remember reading that it was around 64 per thread, but I may be wrong.

One thing you may want to look into for Win2000 is IOCP. I *think* it stands for I/O completion ports, but as usual it''s a guess from terrible partial memory.
IIRC Windows 98 will only allow you to have 10 listening sockets at one time. This applies to incoming socket connections only... Each listening socket may accept (and keep open) some larger number of sockets (I think under Windows 98, the system can''t have more than 1024 or so total sockets open at a time).

I believe Windows 2000 Pro (and NT Workstation) have similiar restrictions. Windows 2000 Server has no built-in restrictions.

And yes, the restrictions are arbitrary so that you''ll go buy the Server versions of NT/2000/XP if you want to host many server/daemon type programs on one system.

Windows 2000 Pro has a limitation of 10 active connections. That is limited by the OS itself and can''t be increased. Perhaps hacked?

Windows 2000 Server has a setting that limits the number of connections, but can be increased. They have an honor system for the number of connections. Basically, you are suppose to purchase connection licenses to the operating system, but you can really just go into the control panel and increase the number of users. You aren''t suppose to do this beyond your license agreement.

I have had people set-up IIS web servers on Windows 2000 Pro and run into the 10 user limitation.

I never heard of limitations on Win98. I''m pretty sure WinXP has some type of limitation. If you choose XP, definitely use XP Pro in the least. XP home has a lot of networking limitations.
The 10 user limit is for logging into a computer as a user. It has nothing to do with how many sockets or connections can be made at once.

People keep saying there''s a limit for like a web-server yet fail to offer relavent documentation and I''ve never found any to support such a claim yet. My web-server is doing just fine with hundreds of unique IPs connecting every day and thousands of pages being served up.

Ben


This article may explain the ''10 connection limit'' a bit better:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q122920
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
I had asked this question at another Windows forum, and apparently, there IS a 10-connection limit on Win 9x/NT Workstation. This limit is on the number of INBOUND socket connections from UNIQUE IP Addresses. Note that it means that no more than 10 unique ip addresses may be simultaniously connected to a computer. However, I''ve never seen experimental evidence to back this up. If someone can verify this experimentally, I would be grateful.

Again, its not the number of sockets open. For example you could have 100 sockets open, but if they all connect to a single IP address, then its just one connection out of the 10 available.

As I said, I don''t know if anyone has verified this experimentally. But if its true, I would think that someone would have found a way to hack it.
The limit probably isn''t based on a hard number, I imagine there is a limit but it''s probably a high one, 65536 or something like that. You''re more limited by the system resources. Every open socket takes up physical memory.

BTW, the 10 (or what ever you enter durring setup) USER limit is only for users logged into a windows NT/2000 domain. It''s not a limit on TCP/UDP connections to the server.
The Winsock Programmer''s FAQ recently updated its information on the maximum number of sockets on some Windows OS''s: http://tangentsoft.net/wskfaq/advanced.html#maxsockets
________________________________________________"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

This topic is closed to new replies.

Advertisement