Append newlines to messages, split on them when receiving multiple messages.