I am currently using the BSD sockets API. I would like to use the select() function to monitor (a) the listener socket which waits for new connections using accept(), and (b) all the client sockets created via accept() or connect(). I want the listener socket to not have any timeout, and I want each client socket to have a timeout of 120 seconds.
Is this possible using the select() function? It only accepts a single timeout value for all sockets, so my assumption is no. If so, am I doomed to making a server in which each socket runs in blocking mode in its own thread?