Using libcurl with libevent

Can someone show (via code) or explain to me how I can use libevent and twist together in a c-program? I am trying to write a high-performance non-blocking data monitor that should load data into a CouchDB instance. I am familiar with libevent and curl, but merging curl_multi with libevent for some reason puzzled me. I don't understand the program flow of the official libcurl example - can someone point me or suggest a simpler example?

+5
source share
1 answer

The key is indeed the curl_multi_socket_action () function , which should be used as soon as your event library says something on the socket. Event-based libcurl is more complex than a "simple" libcurl, so making a very simple example is not straightforward.

+7
source

All Articles