cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: read function

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 2 Oct 2006 15:13:31 -0700

On Mon, Oct 02, 2006 at 01:52:10PM -0700, Behnam Rashidian wrote:
> Thanks, that actually helps but how do I point void *stream (to the
> right stream/memory location?

You pass in the value before starting the transfer.

> The getinmemory.c example is easier since the void *stream points to an
> empty chunk of memory but in my case I want to point to some actual data
> (not a file of course). Just to make myself more clear: I am going to be
> receiving data on the fly, and there is not enough space to actually
> store the data into a file, therefore the data will be streamed over to
> a server as it arrives. Also the data size N might not be fixed, will I
> still experience that the server "hangs" waiting for the rest of the
> data that won't come or is there a way to go around this?

Naturally, if the server is expecting data, it's going to wait for that data.
What else is it supposed to do? Eventually, it will time out and abort,
but until that happens it's going to wait. Your libcurl app doesn't need
to send a fixed amount of data each time--it just sends all it has each
time around..

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-10-03