read function

Read a protocol buffer message from a connection