This code is excerpted from our UDP/TCP packet processing system. Your mission, should you choose to accept it, is to:
-
Build and run the code.
-
Understand the
getIntValue
andsetBytes
methods ofNetworkBytes
.getIntValue
is already commented. Add comments tosetBytes
. You do not need to understand it perfectly, but I'd like to see that you've got the general idea. -
Write down the number shown by the two print statements in
main
(hint, it's the same both times!). Explain how that number is constructed, in each case. You don't need to go into too much detail. Again, I just want to see that you've got the idea. -
Have fun. Feel free to reach out to me at [email protected] with any questions.