I have some questions about select() and poll().
I heard the poll( ... ) call is usually preferred over and more efficient than select( ... ) simply because poll( ... ) only requires that you specify the handles you are interested in and can be quickly iterated thru by the system function call...
But if you have a VERY busy server and almost ALL handles are being used - then their efficiency should be about equivalent. and in a very few cases select( ) may actually beat poll( ) depending on the internal implementation. ..
Does it mean I should use select() when client number is large?
one drawback of select() is it only supports at most 1024 fd. Does it mean a server can set up at most 1024 connection to clients? but in my case, all 10k clients are able to set up connection with sever. How did it happen?
I heard the poll( ... ) call is usually preferred over and more efficient than select( ... ) simply because poll( ... ) only requires that you specify the handles you are interested in and can be quickly iterated thru by the system function call...
But if you have a VERY busy server and almost ALL handles are being used - then their efficiency should be about equivalent. and in a very few cases select( ) may actually beat poll( ) depending on the internal implementation. ..
Does it mean I should use select() when client number is large?
one drawback of select() is it only supports at most 1024 fd. Does it mean a server can set up at most 1024 connection to clients? but in my case, all 10k clients are able to set up connection with sever. How did it happen?