If you are programming under a Posix compliant system, you should be able to use the poll() function instead of select() and this will do away with the limit that you mention. Alternatively, you can call select() multiple times in succession but be certain to use a relatively short timeout.