cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: chunked example

From: Roztkowski, Piotr <proztkowski_at_adlex.com>
Date: Wed, 29 Dec 2004 13:07:27 +0100

Hi,

Thanks for response.

One way or another for communication in both direction you need two
additional threads. What I would like to have is something similar to socket
communication. Application provides buffer to read or send data instead of
callbacks, and application should decide whether to use chunks or regular
GET or POST. This is wishlist, but I found that max chunk size to send is
16K. Is it true? Can I get back control using multi interface after sending
chunk?

Piotr

Piotr

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-30