I have a client that manages the socket connection on its own (actually using libevent
's bufferevent
). Now, I'd like to use libcurl
to produce and send HTML GET
requests on that socket. I'm done with this part by feeding libcurl
, my already opened socket using OPENSOCKET_FUNCTION
option.
But my problem is now that both libevent
and libcurl
are listening on the socket and sometimes it's libevent
who answers to the socket when it has data, and sometimes it's libcurl
.
Is there way to tell libcurl to just produce and send the GET
request for the url, but not to listen on socket so I can take the matters in my hand after libcurl
wrote the url in the socket?
Obviously, I'm using curl_mult
i interface for non-blocking sockets, otherwise curl_easy_perform
doesn't return 'til it receives its answer.
I don't want to let the bufferevent
listener go and stay with libcurl
, because it's a multi-protocol program, and I'm implementing the http part of it. Other protocols don't have the luxury of using libcurl
, so I need to keep the bufferevent
structure.