cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: post data in a chunk to http server and also receive data from there to a chunk

From: Jerry G. Chiuan <jerry_at_oridus.com>
Date: Thu, 11 Sep 2003 10:28:25 -0700

> On Wed, 10 Sep 2003, Jerry G. Chiuan wrote:
>
> > I am rookie in libcurl and would like to ask a simple question: how can
I
> > post data in a chunk to http server and then receive response data from
> > there to a chunk I know we have curl_easy_perform( ), but it only
transfers
> > file I think
>
> Did you read the docs and the examples? I don't think there's much in
there
> that tricks you into believing libcurl only supports posting of files.
>
> Try reading up on CURLOPT_POSTFIELDS and family. You can also set
CURLOPT_POST
> to true and then set CURLOPT_READFUNCTION to have your callback called for
> each chunk to send off.

Hi,
- do we have to have CURLOPT_READFUNCTION get called for each request
sending?
- As I know, it requires one thread to be launched to execute this callback
function, doesn't it ? is it expensive?
Why I would like to know more about it is cuz my application's threads would
send requests very extensively

> Receiving data? Try CURLOPT_WRITEFUNCTION.

Similarly, CURLOPT_WRITEFUNCTION needs to be executed by one thread for each
response from server, doesn't it?

Regds,
- Jerry

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-11