projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added to library function to check endianess
[gapil.git]
/
sources
/
TCP_echo.c
diff --git
a/sources/TCP_echo.c
b/sources/TCP_echo.c
index 275d570c1739d423f9a79fdcae0826f200add939..7fdb8370202a60be91ce204e49903756d7b69fa0 100644
(file)
--- a/
sources/TCP_echo.c
+++ b/
sources/TCP_echo.c
@@
-26,7
+26,7
@@
*
* Usage: echo -h give all info's
*
*
* Usage: echo -h give all info's
*
- * $Id: TCP_echo.c,v 1.
5 2003/07/27 23:41:04
piccardi Exp $
+ * $Id: TCP_echo.c,v 1.
7 2003/08/03 18:12:47
piccardi Exp $
*
****************************************************************/
/*
*
****************************************************************/
/*
@@
-115,7
+115,6
@@
int main(int argc, char *argv[])
perror("Cannot set linger");
exit(1);
}
perror("Cannot set linger");
exit(1);
}
- return 0;
}
/* do read/write operations */
ClientEcho(stdin, sock);
}
/* do read/write operations */
ClientEcho(stdin, sock);
@@
-144,9
+143,9
@@
void ClientEcho(FILE * filein, int socket)
if (nwrite < 0) {
printf("Errore in scrittura %s", strerror(errno));
}
if (nwrite < 0) {
printf("Errore in scrittura %s", strerror(errno));
}
-
nread = FullR
ead(socket, recvbuff, strlen(sendbuff));
+
nread = r
ead(socket, recvbuff, strlen(sendbuff));
if (nread < 0) {
if (nread < 0) {
- printf("Errore in lettura %s", strerror(errno));
+ printf("Errore in lettura %s
\n
", strerror(errno));
}
recvbuff[nread] = 0;
if (fputs(recvbuff, stdout) == EOF) {
}
recvbuff[nread] = 0;
if (fputs(recvbuff, stdout) == EOF) {