Add length of message to the header of message