curl-users
Re: libcurl multi socket
Date: Wed, 10 Dec 2014 10:33:31 -0800
+curl-users
I've decided to go with curl-multi for now, since I don't have an event
reactor at the moment to integrate with.
One thing isn't clear to me, though. If I have a thread dedicated to
blocking on select() and then calling curl_multi_perform(), then it seems
like I need to get my outgoing requests onto that thread somehow. (In an
async world, it seems like it shouldn't be necessary to do writing and
reading on the same thread, but the prohibition against sharing curl
handles between threads requires it.) Question: is there a best practice
for doing this in curl, or do I just have to hack something up with a deque
and a mutex?
On Mon, Dec 8, 2014 at 4:14 PM, Lindley French <lindleyf_at_gmail.com> wrote:
> Hi,
>
> I'm in the process of trying to upgrade some code that uses curl-easy to
> use one of the async APIs instead. I see there are two APIs; curl-multi and
> curl-multi-socket.
>
> I've read through the docs but I'm still not clear on which API fits my
> use-case better, and there are some aspects of them I'm not clear about.
> Does anyone have a comprehensive compare/contrast of the two approaches,
> and maybe some example code I can work from?
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-12-10