Altre correzioni.
[gapil.git] / sources / ElemEchoTCPClient.c
index 57b8fa1e3a94bcee4018ac14ddb92cf3afee2444..19f62650766bbdfd6846e9c4d4da930e04ee6a43 100644 (file)
@@ -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.6 2003/04/29 15:33:39 piccardi Exp $
  *
  ****************************************************************/
 /* 
@@ -38,8 +38,6 @@
 #include <sys/socket.h>  /* socket library */
 #include <stdio.h>      /* 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);
     }