Continuo a riordinare gli esempi.
[gapil.git] / listati / ServEcho.c
diff --git a/listati/ServEcho.c b/listati/ServEcho.c
deleted file mode 100644 (file)
index 686c14a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-void ServEcho(int sockfd) {
-    char buffer[MAXLINE];
-    int nread, nwrite;
-    char debug[MAXLINE+20];
-    /* main loop, reading 0 char means client close connection */
-    while ( (nread = read(sockfd, buffer, MAXLINE)) != 0) {
-       nwrite = FullWrite(sockfd, buffer, nread);
-       if (debugging) {
-           buffer[nread] = 0;
-           snprintf(debug, MAXLINE+20, "Letti %d byte, %s", nread, buffer);
-           if (demonize) {          /* go daemon */
-               syslog(LOG_DEBUG, debug);
-           } else {
-               printf("%s", debug);
-           }
-       }
-    }
-    return;
-}