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 _______________________________________________ Linux-audio-user mailing list Linux-audio-user@lists.linuxaudio.org https://lists.linuxaudio.org/listinfo/linux-audio-userReceived on Tue May 4 04:15:01 2021
This archive was generated by hypermail 2.1.8 : Tue May 04 2021 - 04:15:01 EEST