int docmd(char cmd) { int rc = 1; switch (cmd) { case 'd': proto_debug_on(); break; case 'D': proto_debug_off(); break; case 'u': rc = doUpdateClients(); break; case 'q': rc=-1; break; case '\n': case ' ': rc=1; break; default: printf("Unkown Command\n"); } return rc; }
void* updateLoop(void) { while (1) { usleep(10000); doUpdateClients(); } }