Purpose

This function checks to see if something has been received. If so, the data is returned.