n = read(newsockfd,buffer,1024);/*read from client*/ if (n <= 0) { perror("\n ERROR reading from socket \n");/*check for errors*/ break; }