cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: chunked example

From: Andy Hobbs <andy_at_hobbs.uk.net>
Date: Wed, 29 Dec 2004 09:56:48 +0000

Hi,

2 ways I:'d consider doing this are:

Using call backs for reading and writing you can do your
generation/processing as and when curl is ready for you

or

Use threads and have one thread doing the generating/processing and
another handling the connection

Andy

On Mon, 2004-12-27 at 14:46, Roztkowski, Piotr wrote:
> I'd like to use chunked transfer in my application to transfer data
> generated dynamically.
> In most cases algorithm looks following for writing:
>
> do
> {
> generate data chunk
> transfer chunk
> } while not end of data
>
> for reading:
>
> do
> {
> read chunk
> process chunk
> } while not end of data
>
> Is it possible with curl? In curl I have to wait in easy_perform
> function until end of transfer? How can I get chunk for GET and POST
> operation? Any example?
>
> piotr
>
>

-- 
Andy Hobbs <andy_at_hobbs.uk.net>
Received on 2004-12-29