diff options
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); |