a little more robust.

Changed the receive a bit and commented out the sent requests for easier
reading during testing.
Updated receive functions to spin until have whole message.

Put a while loop around the receive functions to make sure only full
messages are received to prevent crashing.