projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Altre modifiche da Mirko
[gapil.git]
/
sources
/
SimpleEchoTCPClient.c
diff --git
a/sources/SimpleEchoTCPClient.c
b/sources/SimpleEchoTCPClient.c
index 5661f870a1e96c96593badfe43984e35fb1d9ebd..70855ad5e8a6c8d7340c341cb83fb22691c78d02 100644
(file)
--- a/
sources/SimpleEchoTCPClient.c
+++ b/
sources/SimpleEchoTCPClient.c
@@
-26,7
+26,7
@@
*
* Usage: echo -h give all info's
*
*
* Usage: echo -h give all info's
*
- * $Id: SimpleEchoTCPClient.c,v 1.
4 2001/09/09 22:45:34
piccardi Exp $
+ * $Id: SimpleEchoTCPClient.c,v 1.
6 2003/02/02 20:35:33
piccardi Exp $
*
****************************************************************/
/*
*
****************************************************************/
/*
@@
-38,8
+38,6
@@
#include <sys/socket.h> /* socket library */
#include <stdio.h> /* include standard I/O library */
#include <sys/socket.h> /* socket library */
#include <stdio.h> /* include standard I/O library */
-#include "wrappers.h"
-
#define MAXLINE 256
void usage(void);
void EchoClient(FILE * filein, int socket);
#define MAXLINE 256
void usage(void);
void EchoClient(FILE * filein, int socket);
@@
-122,8
+120,8
@@
void EchoClient(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);
}