gpt4 book ai didi

c++ - CURLOPT_PROGRESSFUNCTION 这些参数是什么意思?

转载 作者:行者123 更新时间:2023-11-28 03:27:01 24 4
gpt4 key购买 nike

libcurl中,设置CURLOPT_PROGRESSFUNCTION调用的函数中的参数是什么意思?

int function(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);

我知道这是一个蹩脚的问题,但网站似乎没有描述,或者我找不到 :(

最佳答案

example可能有帮助。总结:

int function(
void *clientp, // this is an unchanged pointer as set with CURLOPT_PROGRESSDATA
double dltotal, // the total bytes to be downloaded (or 0 if not downloading)
double dlnow, // the current download bytecount (or 0 if not downloading)
double ultotal, // the total bytes to be uploaded (or 0 if not uploading)
double ulnow); // the current upload bytecount (or 0 if not uploading)

参见 CURLOPT_PROGRESSDATA对于 clientp。如果您从回调中返回任何非 0 的值,传输将被取消。

关于c++ - CURLOPT_PROGRESSFUNCTION 这些参数是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13657630/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com