i wrote a sever with c. i put a non-terminate loop, but not work correctly.while loop not perform permanently.
in this code, i want to if there were no person to connect, recieve message from other clients that conected already.
For example: the last statement work a time.
what is wrong?!
what should i do?!
int newSocket = accept(tcp_socket,(struct sockaddr*)&server_addr,&s);
// recv msg from client that conected beforhand
// if one client connect