cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTPS and Multi-threading

From: Olano, Ever <eolano_at_cybersource.com>
Date: Tue, 8 Jun 2004 18:14:22 -0700

Thanks, Daniel. Please see my additional questions inline (I've removed the questions that have been answered and renumbered the remaining ones).

1. > I would estimate that most people don't [build with ares-support].

Is that because dns-resolves don't usually time out or is that because most people don't care/worry too much about it?

2. > What's that [mttest.c]?

It's the sample code in OpenSSL that shows how to implement and set the callback functions needed for multithreading to work. I wanted to know if anyone has tried it as I wanted to just copy it. Do you or anyone, by any chance, have their own code for the locking and id callback functions?

3.
>> It seems I have to set these callback functions in the main thread too
>> (before any threads are spawned, I guess). Again, my problem is that I'm
>> building a library to be used by our customers. Should I make them set
>> these in their code?

>Possibly, it pretty much depends on what API you provide to your customers.

I think it would have to be that way. The customer will somehow set the callback functions (either directly or through some intermediate function that I expose) in their main thread. It's not possible in certain cases though. There are cases where the merchant just doesn't have any initialization routine/section to put the calls in. :(

It wouldn't be good to synchronize the calls to curl_easy_perform() from *any* handle, would it?

Has somebody else written a library that uses curl/openssl? If so, how did you approach this issue?

Thanks,
Ever
Received on 2004-06-09