how to properly reuse a curl handle

前端 未结 3 2061
执念已碎
执念已碎 2021-02-01 05:10

I want to properly reuse a curl handle, so that it won\'t give me errors and function normally.

Suppose I have this piece of code:

    CURL *curl;

    c         


        
3条回答
  •  囚心锁ツ
    2021-02-01 05:38

    Or do I need to use curl_easy_reset() on that handle?

    You either reset it XOR clean it up (before assigning the return value of curl_easy_init() again) - doing both is not good. For more info, see the documentation.

提交回复
热议问题