Cancel libcurl easy handle

寵の児 提交于 2020-01-14 10:08:23

问题


Is there an easy way to cancel a curl_easy_perform from another thread?


回答1:


You have to use the callback functions (write/read/progress) to perform the cancel. The other thread needs to set a flag and the callback function checks the flag and returns the proper value to cancel the operation.



来源:https://stackoverflow.com/questions/235763/cancel-libcurl-easy-handle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!