Sending data until end of stream is reached