void * serverThread(void * args) { Server * me = (Server *) args; while(servStatus(me)) { servLoop(me); } return NULL; }
void * serverThread(void * args) { Server * me = (Server *) args; //listen on the given port if(listen(me->socket, me->queueLen) == -1) { perror("listen"); servOff(me); return NULL; } //all clear, run the main loop function while(servStatus(me)) { DEBUGOUT("calling servLoop()"); servLoop(me); } delConnections(me); return NULL; }