From c8ea8ec6748e030e00ba8b4a4ee0d58c58a87b1c Mon Sep 17 00:00:00 2001 From: sotech117 Date: Thu, 21 Sep 2023 04:52:03 -0400 Subject: small improvments --- listener.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'listener.c') diff --git a/listener.c b/listener.c index 9cf1c00..04e3030 100644 --- a/listener.c +++ b/listener.c @@ -83,16 +83,13 @@ int main(int argc, char *argv[]) char buf[MAXBUFLEN]; while(1) { - // printf("\nlistener: waiting to recvfrom... %d times\n", count++); - addr_len = sizeof their_addr; if ((numbytes = recvfrom(sockfd, buf, MAXBUFLEN , 0, (struct sockaddr *)&their_addr, &addr_len)) == -1) { perror("recvfrom"); exit(1); } - - // print the size + // print the buffer write(STDOUT_FILENO, buf, numbytes); memset(buf, 0, MAXBUFLEN); -- cgit v1.2.3-70-g09d2