I don't know too much about this sort of thing, but read() only reads from one file descriptor. I'd imagine you'd have to do something like this:
Code:
repeat indefinitely:
call accept() to receive incoming connections
if any incoming connections were received, add the file descriptor to a set of descriptors
call select(), giving it the set of file descriptors with a timeout of a few milliseconds or whatever
call read() on the sockets which are ready for reading
close any sockets which have been disconnected
The trouble is that you presumably want to receive incoming client connections even while other connections are not responding; so you need to call select() with a small (or zero) timeout. You'll have to have some other way of figuring out when each connection was last active.
As I said, though, I really don't know much about this. Read the man pages ("man 2 select", etc) and Beej's tutorial (google it, you'll find it).