epugar
1
packetBuffer[0] = 0b11100011; // LI, Version, Mode
packetBuffer[1] = 0; // Stratum, or type of clock
packetBuffer[2] = 6; // Polling Interval
packetBuffer[3] = 0xEC; // Peer Clock Precision
// 8 bytes of zero for Root Delay & Root Dispersion
packetBuffer[12] = 49;
packetBuffer[13] = 0x4E;
packetBuffer[14] = 49;
packetBuffer[15] = 52;
I'm writing a paper of my project and I need to explain every step of my code. I really need a help here. How to translate this to our human language?
PieterP
2
You wrote it, don't you? Nobody knows better what it does than you.
Also, I doubt you need to explain every line. Just the flow. If not, you really need to have a talk with your teacher about how code works... :
epugar
4
Well, used examples and open source code on some things
It assigns values to an array, nothing else.
epugar:
Well, used examples and open source code on some things
That's irrelevant.
The RFC I linked to explains the meaning of all of the fields you're setting in your code.