cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: libcurl and libssh2

From: Xu, Qiang (FXSGSC) <Qiang.Xu_at_fujixerox.com>
Date: Tue, 20 Oct 2009 16:21:39 +0800

> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Daniel Stenberg
> Sent: Tuesday, October 20, 2009 4:12 PM
> To: libcurl development
> Subject: RE: libcurl and libssh2
>
> On Tue, 20 Oct 2009, Xu, Qiang (FXSGSC) wrote:
>
> > Can I assume that if the callback is not defined in the code, the
> > system function fread() is used by default?
>
> Yes. I believe it's even documented somewhere...

You are right. It is documented:
========================================
/* from http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADFUNCTION */
If you set the callback pointer to NULL, or don't set it at all, the default internal read function will be used. It is simply doing an fread() on the FILE * stream set with CURLOPT_READDATA.
========================================
My bad eyesight.

Thanks,
Xu Qiang
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-20