cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: STDOUT and libcurl

From: Guenter <lists_at_gknw.net>
Date: Sat, 16 Oct 2010 05:58:02 +0200

Am 15.10.2010 23:50, schrieb Jeff Pohlmeyer:
> On Fri, Oct 15, 2010 at 4:31 PM, Vasanthi Ramasamy wrote:
>
>> Take a look at this standalone code, where HTTP POST is successful, but the
>> return code of curl_easy_perform() is always 23 (WRITE ERROR). I need to
>> close stdin, stdout and stderr. If I don’t close stdout, return code is 0.
>> Why is this ? And how can I solve this issue ? I’m using libcurl 7.21.1 and
>> RedHat 5. I tried MUTE. but it has been obsoleted. Is there any equivalent
>> options for MUTE ?
>
> The simplest thing might be to assign an empty
> CURLOPT_WRITEFUNCTION that just returns size*nmemb
> but doesn't write the data.
see this sample:
http://curl.haxx.se/libcurl/c/chkspeed.html
which does exactly what Jeff suggested.

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-16