A
Abby
I'm working on sending and receiving data packet using UDP. I don't
know the length of the data packet I'm receiving but I would like to
print out all bytes in that packet to the screen. How can I do that?
Right now, I have to do something like this ...
printf("Data Received: \n");
for (i=0; i<=50; i++){
printf("Data %d: %d\n", i, resp->data);
}
"50" is the no. that I thought the data bytes in the packet will not
exceed this range. Please let me know if there're other ways to print
out the exact number of data bytes in the packet. Thank you.
Abby.
know the length of the data packet I'm receiving but I would like to
print out all bytes in that packet to the screen. How can I do that?
Right now, I have to do something like this ...
printf("Data Received: \n");
for (i=0; i<=50; i++){
printf("Data %d: %d\n", i, resp->data);
}
"50" is the no. that I thought the data bytes in the packet will not
exceed this range. Please let me know if there're other ways to print
out the exact number of data bytes in the packet. Thank you.
Abby.