Send and receive tcp packets with a header giving the length of the message.