What about a possibility to monitor a few sockets by 1
wait call? (wrapper for select() socket API proc)
for example:
// we use flags pendingInput, pendingOutput, sockError
(!!! add this also, please)
class Socket : public xxxx {
...
static int select(Socket* s1, int* f1, Socket* s2 =
NULL, int timeout, ...);
...
}
----------
and using like that:
Socket* s_client, s_server.
int f_client, f_server;
f_client = f_server = pendingInput | pendingOutput |
sockError;
int n = Socket::select(s_client, &f_client, s_server,
&f_server, NULL, MY_TIMEOUT);
if(f_client) {
// proccess client socket
}
// and so on?
-----------
it would be nice to add that feature.
Regards, Dmitry.