*
* Usage: echod
*
- * $Id: SimpleEchoTCPServer.c,v 1.2 2001/06/11 22:15:57 piccardi Exp $
+ * $Id: SimpleEchoTCPServer.c,v 1.3 2001/06/12 22:17:22 piccardi Exp $
*
****************************************************************/
/*
int nread, nwrite;
/* main loop, reading 0 char means client close connection */
- while ( (nread = SockRead(sockfd, buffer, MAXLINE)) != 0) {
+ while ( (nread = read(sockfd, buffer, MAXLINE)) != 0) {
+ printf("Letti %d bytes, %s ", nread, buffer);
nwrite = SockWrite(sockfd, buffer, nread);
}
return;