In comm.c, I have code that looks like this:
/* Main loop */
while ( !mud_down )
accept_new( control );
accept_new( control2 );
accept_new( conjava );
Basically, that is supposed to poll all the listening ports, I guess. But accept_new adds all the currently connected sockets (ie. players, etc) to the FD_SET before calling select. Does this not mean that the 2nd, 3rd, and 4th calls to accept_new (and hence select) are just gonna be filling the FD_SETs another 3 times with no benefit?
I'm thinking about changing it to call accept_new once, but sending a zero-terminated array of descriptors to poll so it can add them all and process all the listening ports in one select. Does this sound reasonable?