TPC’s data transfer is based on stream. If the two sides don’t agree on how to detect the end of self-defined message, the receiver won’t know the boundary of a message.
A simple way is to have a special character is the ending flag, such as "2 new lines".
The problem is that the message body can contain ending flags.
A common-used approach is to specify the byte length of your message. You need to define a header and a body, in the header you tell the length of all the message. It is complicated for message receivers, though.