X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FElemEchoTCPClient.c;h=942b21a203ce683f7182f9dcdecc75ed8446805e;hp=57b8fa1e3a94bcee4018ac14ddb92cf3afee2444;hb=626fee850ef998ab730a6da711494d6a5ace1be5;hpb=54d27b07aee6d293931ee274a3ede927f517f2cf diff --git a/sources/ElemEchoTCPClient.c b/sources/ElemEchoTCPClient.c index 57b8fa1..942b21a 100644 --- a/sources/ElemEchoTCPClient.c +++ b/sources/ElemEchoTCPClient.c @@ -26,7 +26,7 @@ * * Usage: echo -h give all info's * - * $Id: ElemEchoTCPClient.c,v 1.3 2001/09/09 22:45:34 piccardi Exp $ + * $Id: ElemEchoTCPClient.c,v 1.8 2003/05/02 09:55:13 piccardi Exp $ * ****************************************************************/ /* @@ -38,8 +38,6 @@ #include /* socket library */ #include /* include standard I/O library */ -#include "wrappers.h" - #define MAXLINE 256 void usage(void); void ClientEcho(FILE * filein, int socket); @@ -101,7 +99,7 @@ int main(int argc, char *argv[]) return -1; } /* read daytime from server */ - EchoClient(stdin, sock_fd); + ClientEcho(stdin, sock_fd); /* normal exit */ return 0; } @@ -122,8 +120,8 @@ void ClientEcho(FILE * filein, int socket) char sendbuff[MAXLINE], recvbuff[MAXLINE]; int nread; while (fgets(sendbuff, MAXLINE, filein) != NULL) { - SockWrite(socket, sendbuff, strlen(sendbuff)); - nread = SockRead(socket, recvbuff, strlen(sendbuff)); + FullWrite(socket, sendbuff, strlen(sendbuff)); + nread = FullRead(socket, recvbuff, strlen(sendbuff)); recvbuff[nread] = 0; fputs(recvbuff, stdout); }