Unix/Linux Server 256 Socket Limit Question
I just had a look in the Winsock help files, it it would seem that under Windows, FD_SET's have a default max descriptor of 64 entries (you can set it higher, but defaults are usually there for a reason). I would suspect you might have to do multiple selects() on ranges of connections, or fork it out to handle each range seperately.. I've never thought about it, but I suppose it would be a problem ..
In unix, to use the select(...) routine to poll sockets for state changes, the file descriptor structure is a 256 bit array. This effectively limits a single process to only accessing 256 sockets at one time. How can do you get around this problem to allow more than 256 sockets/process?
Thanks in advance.
------------------
DavidRM
Samu Games
We're considering something we're calling "relay servers" which are forked off to handle some of the connections. Before we go to that much trouble, though, we wanted to know if anyone knew a better way around the 256 connection limit.
------------------
DavidRM
Samu Games
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement