As far as I remember the packages always ends with "\r". (0x0d)
It could be that you have multiple packets in your buffer but also that only the half of the packet is in your buffer. The other half will be in the next buffer.
You need to handle that correctly. (so check if the last character in your buffer is "\r", if not, then there are more bytes to read in the TCP stream)
Not sure about the timestamp - maybe it's from your console?
It could be that you have multiple packets in your buffer but also that only the half of the packet is in your buffer. The other half will be in the next buffer.
You need to handle that correctly. (so check if the last character in your buffer is "\r", if not, then there are more bytes to read in the TCP stream)
Not sure about the timestamp - maybe it's from your console?