假设你有这个
curl_easy_setopt(pCurl, CURLOPT_URL, url);
curl_multi_add_handle(pCurlMulti, pCurl);
curl_multi_perform(...)
//现在我们正在等待服务器的响应 //在等待的时候,我们可以打电话吗
curl_easy_setopt(pCurl, CURLOPT_URL, newUrl);
//没有curl_multi_remove_handle& curl_multi_add_handle?
答案 0 :(得分:1)
No, you don't change the URL of an active transfer. Instead, enable pipelining on the multi handle and then add one easy handle for each transfer; the multi handle will pipeline the requests over the same connection if possible.