Consolidate message reads from stdin

Read the length header, then length bytes and parse the message in the
buffer.