X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FSimpleEchoTCPServer.c;h=9611e365eb2856d3e75f9de0c019c80a8896a1d9;hp=8c0dff80698b6ff5806582a81803625625015d38;hb=0d1802dcd969187e6133ba143ebc473c9fefc259;hpb=2edbeab14f348c4fa78f91e10066b74475c2353a diff --git a/sources/SimpleEchoTCPServer.c b/sources/SimpleEchoTCPServer.c index 8c0dff8..9611e36 100644 --- a/sources/SimpleEchoTCPServer.c +++ b/sources/SimpleEchoTCPServer.c @@ -8,7 +8,7 @@ * * 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 $ * ****************************************************************/ /* @@ -129,7 +129,8 @@ void SockEcho(int sockfd) { 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;