cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: getting html to buffer?

From: Admir Efendic <admir_at_softwell.se>
Date: Mon, 01 Oct 2001 11:59:39 +0200

Ah, stupid me, I missed that example "getinmemory.c" =)
Thx anyway
/admir

Daniel Stenberg wrote:

>On Mon, 1 Oct 2001, Admir Efendic wrote:
>
>[CC'ing this reply to the libcurl list which seems a more appropriate list
>for this discussion.]
>
>>I'm trying to get an html-file to char* buffer with curl. I am using
>>multiple threads, each thread have their own instance of curl and are
>>fetching different html pages. Is there a straightforward way to do this,
>>or do I have to write html to a file, and then open the file (or mmap
>>it)? Specifying custom write function to curl doesn't really help,
>>because I am forced to use global buffer (visible to both thread_function
>>& write_function ) and that's a nono with threads ;-).
>>
>
>I don't understand your situation. Why are you forced to use a global buffer?
>Why can't each thread simply download the file into its own thread-specific
>buffer?
>
Received on 2001-10-01