Forum Discussion
Alan_Sha
Sep 06, 2005Nimbostratus
Yes, when the terminator size is more than 1 byte, it is not guaranteed that the terminator will always come in one packet.
I think I can use a n bytes buffer (where n is the size of the terminator.) to keep track of last n bytes of the received response so far, which gets refreshed accordingly when a packet arrives. This way we won't miss the terminator in case it doesn't come in one packet.
Is this the correct approach?