I have a program where the Arduino acts as an Ethernet Server.
The client continuously sends packets which is of the following format
Start Byte=0x7E;
Some Data/Command Bytes; //Can be of varying length
End Byte=0x7A;
Some packets take more time to process than others.
So my question is what is the best way to read the bytes of the memory so that we always work on one packet at a time.I can read in data from the buffer one at a time and loop through till the END BYTE is reached but it doesn't seem a very efficient way to get the packets.
I would be interested if someone has better ideas on how to read in packets one at a time from the buffer in the most efficient way possible.