X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FSimpleEchoTCPClient.c;fp=sources%2FSimpleEchoTCPClient.c;h=31adf9fdabc7793ab906b6af25e8658f055cd854;hp=73654529b7f825e3da66d66d4ce994c46d54db91;hb=4ff5f41266fec476e9a8d2d2d2cf4c58f8bb5590;hpb=9571a19b1524491a8e43f2c0176243d2483cf986 diff --git a/sources/SimpleEchoTCPClient.c b/sources/SimpleEchoTCPClient.c index 7365452..31adf9f 100644 --- a/sources/SimpleEchoTCPClient.c +++ b/sources/SimpleEchoTCPClient.c @@ -8,7 +8,7 @@ * * Usage: echo -h give all info's * - * $Id: SimpleEchoTCPClient.c,v 1.2 2001/06/13 17:17:15 piccardi Exp $ + * $Id: SimpleEchoTCPClient.c,v 1.3 2001/06/17 21:58:46 piccardi Exp $ * ****************************************************************/ /* @@ -105,10 +105,7 @@ void EchoClient(FILE * filein, int socket) int nread; while (fgets(sendbuff, MAXLINE, filein) != NULL) { SockWrite(socket, sendbuff, strlen(sendbuff)); - if ( (nread = read(socket, recvbuff, MAXLINE)) == 0) { - perror("Sever read error:"); - exit(-1); - } + nread = SockRead(socket, recvbuff, strlen(sendbuff)); recvbuff[nread] = 0; fputs(recvbuff, stdout); }