diff options
Diffstat (limited to 'listener.c')
-rw-r--r-- | listener.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -34,7 +34,6 @@ int main(int argc, char *argv[]) int rv; int numbytes; struct sockaddr_storage their_addr; - char buf[MAXBUFLEN]; socklen_t addr_len; char s[INET6_ADDRSTRLEN]; @@ -82,6 +81,7 @@ int main(int argc, char *argv[]) int count = 0; + char buf[MAXBUFLEN]; while(1) { // printf("\nlistener: waiting to recvfrom... %d times\n", count++); @@ -91,15 +91,6 @@ int main(int argc, char *argv[]) perror("recvfrom"); exit(1); } - // buf[numbytes] = '\0'; - - //printf("listener: got packet from %s\n", - // inet_ntop(their_addr.ss_family, - // get_in_addr((struct sockaddr *)&their_addr), - // s, sizeof s)); - //printf("listener: packet is %d bytes long\n", numbytes); - //buf[numbytes] = '\0'; - //printf("listener: packet contains \"%s\"\n", buf); // print the size write(STDOUT_FILENO, buf, numbytes); |