Length encoding
This assumes that all TCP/IP processed messages are length-encoded.
Prefix all messages received from a TCP/IP connection with a 2- or 4-byte integer value that specifies the message length. This value is stripped from the message before translation.
Prefix all messages sent to a TCP/IP connection with a 2- or 4-byte integer value.