Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何模拟Curl发送/接收错误_Curl_Libcurl - Fatal编程技术网

如何模拟Curl发送/接收错误

如何模拟Curl发送/接收错误,curl,libcurl,Curl,Libcurl,我是新来的libcurl,请帮我解答以下问题 模拟上面提到的旋度误差 卷发发送错误(55) 发送网络数据失败 卷曲记录错误(56) 接收网络数据失败 客户端使用curl将请求发送到服务器,如果请求失败并出现CURLE\u RECV\u错误(56),客户端将使用服务器再次重试请求 需要模拟上述误差。有人能帮我吗LD_PRELOADsend/recv replacements/wrappers可以根据需要返回任何返回代码 谢谢Daniel,你能解释一下上面的陈述吗,比如,如何在我的用例中使用LD_P

我是新来的
libcurl
,请帮我解答以下问题

模拟上面提到的旋度误差

卷发发送错误(55)

发送网络数据失败

卷曲记录错误(56)

接收网络数据失败

客户端使用curl将请求发送到服务器,如果请求失败并出现
CURLE\u RECV\u错误(56),
客户端将使用服务器再次重试请求


需要模拟上述误差。有人能帮我吗

LD_PRELOAD
send/recv replacements/wrappers可以根据需要返回任何返回代码

谢谢Daniel,你能解释一下上面的陈述吗,比如,如何在我的用例中使用LD_PRELOAD我的用例?深入解释一个用例简单明了的解释: