I was able to do following but have some issue in MHD_queue_response.
Scenario: Main thread having select, without any MHD threads with curl multi integration.(updated benchmark.c)
1. Receive GET, on 2nd call of ahc_echo, saved the connection pointer and invoked curl client to GET to another server.
2. On rsp from second server & curl_multi_perform success, data is copied and saved in association to connection in #1.
3. Just after #2, when curl_multi_info_read is successful , MHD_queue_response is invoked, but it returns 0 and the easy_handle state is 1.
Can we send the response to client only from the MHD callback handler ? or something is missing in above ?
Any help will be appreciated.
Thanks,
Kunal