diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-09-21 04:52:03 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-09-21 04:52:03 -0400 |
commit | c8ea8ec6748e030e00ba8b4a4ee0d58c58a87b1c (patch) | |
tree | daf0d0b679cf71a0c27828374e7cd83cd68a2a59 /listener.c | |
parent | dc5fd35fc23e79edd8a972e8c60f54190eaba4af (diff) |
small improvments
Diffstat (limited to 'listener.c')
-rw-r--r-- | listener.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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); |