On Mon, May 03, 2021 at 09:39:15PM +0200, Winfried Ritsch wrote:
Am Montag, 3. Mai 2021, 11:48:07 CEST schrieb Fons
Adriaensen:
So you can't just 'wait for a
message' without interpreting it and
then only when it is complete pass it to a decoder.
true
Of course the simple solution if you have a 'stream of bytes'
transport is to add a 32-bit int prefix to each message, giving
its length. The you wait for 4 bytes, decode to L, wait for L
bytes, and you have a complete message.
Ciao,
--
FA