@Sam Garfinkel If I send two protobufs over TCP in quick succession, when I read the byte array what I get is the concatenation of both requests. Is there a way to avoid this? (I am flushing)… I am guessing adding a byte specifying the legnth before sending each byte array?
s
Sam Garfinkel
09/28/2020, 4:53 PM
Yeah you’ll need to create a meta-message for serializing your stuff. Protobuf doesn’t handle message delimitation for you.
The easiest way is to prepend the length to each message.