I have a device that sends serial data over a USB to COM port to my program at various speeds and lengths.
Within the data there is a chunk of several thousands bytes that starts and ends with special distinct code ('FDDD' for start, 'FEEE' for end). Due to the stream's length, occasionally not all data is received in one piece. What is the recommended way to combine all bytes into one message BEFORE parsing it? (I took care of the buffer size, but have no control over the serial line quality, and can not use hardware control with USB)Thanks