cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Multi-threaded calls

From: Zoltan Bencik <zoltan.bencik_at_gmail.com>
Date: Tue, 17 Nov 2009 12:50:07 +0500

Hello,

I'm currently using libcurl version 7.19.6 on Linux platform. I need to call
libcurl in multi-threaded environment to fetch the data from the same
server,
and the transfer must be over SSL.
I've compiled libcurl with NSS, and it works all good in single threaded
code.

Then, I spawned 2 threads, each has it's own easy handle, and followed
the instructions
from http://curl.haxx.se/libcurl/c/libcurl-tutorial.html#Multi-threading
So, I've set CURLOPT_NOSIGNAL to 1 on all handles, and set
CURLOPT_DNS_USE_GLOBAL_CACHE to 0
(because without disable global cache I was receiving curl error code 6,
dns problems).
Now, my first thread fails to connect to the server, returning error code
7(CURLE_COULDNT_CONNECT), the second thread doesn't have any problems
and works as it should.

Can anybody instruct me how to make libcurl+NSS work correctly in
multi-threaded applications?
Did I miss anything to set/configure to make this work properly?

Thanks, any help is highly appreciated.
Best regards,
-zoltan.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-17

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET