of bytes returned is less than required, and until either done or zero bytes is returned indicating an EOF.