Fixing receiveBytes for UDP

Changes to this method meant that when a call to receiveBytes
with num_bytes = 0 meant that the function exited without trying
to read.  Checks were added to make sure, in the case num_bytes = 0
to call at least once.