cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: read function

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 Oct 2006 21:31:09 +0200 (CEST)

On Mon, 2 Oct 2006, Behnam Rashidian wrote:

> I am looking for hints or maybe sample code that would do the opposite of
> getinmemory.c, because I need to read a chunk of memory and then stream it
> over TCP instead of saving it into a file. I found this example in the
> tutorial but not sure how to use it or where to find the read function.
>
> curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, read_function);

CURLOPT_READFUNCTION is documented in the curl_easy_setopt man page[1], and
the concept for using it is described in the tutorial[2].

[1] = http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADFUNCTION
[2] = http://curl.haxx.se/libcurl/c/libcurl-tutorial.html

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-10-02