除了max-time之外,如何超出已建立的curl连接

时间:2017-11-22 12:03:03

标签: curl libcurl

如果在没有使用-max-time的情况下连接后服务器没有响应,则要终止连接。

为什么不是max-time是因为我还在我的服务器上下载10GB文件,需要10分钟。所以,如果我正在下载1Mb文件并且连接停止,那么是否应该终止连接而不是等待最大时间?

1 个答案:

答案 0 :(得分:0)

你可能喜欢

 -Y, --speed-limit <speed>
     If  a  download is slower than this given speed (in bytes per second) for speed-time
     seconds it gets aborted. speed-time is set with -y, --speed-time and is  30  if  not
     set.

 -y, --speed-time <seconds>
     If a download is slower than speed-limit bytes per second during a speed-time
     period, the download gets aborted. If speed-time is used, the  default speed-limit
      will be 1 unless set with -Y, --speed-limit.