projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Altre correzioni.
[gapil.git]
/
sources
/
ElemEchoTCPClient.c
diff --git
a/sources/ElemEchoTCPClient.c
b/sources/ElemEchoTCPClient.c
index ac1d9910a4a89ca62e8dd3da8c7b701838853934..19f62650766bbdfd6846e9c4d4da930e04ee6a43 100644
(file)
--- a/
sources/ElemEchoTCPClient.c
+++ b/
sources/ElemEchoTCPClient.c
@@
-26,7
+26,7
@@
*
* Usage: echo -h give all info's
*
*
* Usage: echo -h give all info's
*
- * $Id: ElemEchoTCPClient.c,v 1.
4 2002/12/03 11:06:05
piccardi Exp $
+ * $Id: ElemEchoTCPClient.c,v 1.
6 2003/04/29 15:33:39
piccardi Exp $
*
****************************************************************/
/*
*
****************************************************************/
/*
@@
-99,7
+99,7
@@
int main(int argc, char *argv[])
return -1;
}
/* read daytime from server */
return -1;
}
/* read daytime from server */
-
EchoClient
(stdin, sock_fd);
+
ClientEcho
(stdin, sock_fd);
/* normal exit */
return 0;
}
/* normal exit */
return 0;
}
@@
-120,8
+120,8
@@
void ClientEcho(FILE * filein, int socket)
char sendbuff[MAXLINE], recvbuff[MAXLINE];
int nread;
while (fgets(sendbuff, MAXLINE, filein) != NULL) {
char sendbuff[MAXLINE], recvbuff[MAXLINE];
int nread;
while (fgets(sendbuff, MAXLINE, filein) != NULL) {
-
Sock
Write(socket, sendbuff, strlen(sendbuff));
- nread =
Sock
Read(socket, recvbuff, strlen(sendbuff));
+
Full
Write(socket, sendbuff, strlen(sendbuff));
+ nread =
Full
Read(socket, recvbuff, strlen(sendbuff));
recvbuff[nread] = 0;
fputs(recvbuff, stdout);
}
recvbuff[nread] = 0;
fputs(recvbuff, stdout);
}