https://kotlinlang.org logo
#ktor
Title
# ktor
a

Andrew Gazelka

09/28/2020, 3:35 PM
f I send two byte arrays over TCP raw sockets 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 length before sending each byte array would be the best way to solve this?
e

e5l

09/28/2020, 3:38 PM
Hey @Andrew Gazelka, there are 2 options here: size-first format or sentinel value.
5 Views