my network program is simeple chatting program useing fork() in linux-c.
"top" says >> myprogram take all my com'resource (almost 99% cputime).
below is source.
---------------------------
....
basic connect socket
while(1)
{
read message client;
send message all connected client
}
The end;
----------------
Above program is always top_cpu_time when have no connected client.
How do i solve?