As one of the assigments we have to implement very simple server in C with some clients. The idea is that using system V IPC queues we create one queue where clients register and then for every client there is one queue with messages. I am wondering a bit about server part. Should I have something like this:
while(1)
{
//some queue using code
sleep(100);
}
so for every time interval I check every queue and do what I have to do, or maybe I should use signals to inform server that at least one of the queues is ready to be managed.
How is it done in normal servers, do they have some time interval after which they check everything they need to do or there is more proper way to do this?