Giter Site home page Giter Site logo

Comments (8)

Jayatubi avatar Jayatubi commented on September 25, 2024

能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?

from curl-unity.

huiball avatar huiball commented on September 25, 2024

能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?

目前只锁了workingEasies,但是Lib的操作好像也有多线程问题。

简单改了下例子里的ResumeDownload.cs,反复点几次开始暂停就能复现了。

ResumeDownload.zip

from curl-unity.

huiball avatar huiball commented on September 25, 2024

另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里

from curl-unity.

huiball avatar huiball commented on September 25, 2024

能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?

提了个pr,你看下我是这么改了下测试了下没啥问题了

from curl-unity.

Jayatubi avatar Jayatubi commented on September 25, 2024

另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里

续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。

from curl-unity.

huiball avatar huiball commented on September 25, 2024

另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里

续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。

嗯好的,那个主要是在发生例如网络环境改变或者连接被中断重连时,CurlEasy没有提供一个回调给外面直接就进行重试了,因为下载请求涉及ContentRange,重复请求会导致下载内容有问题

from curl-unity.

Jayatubi avatar Jayatubi commented on September 25, 2024

另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里

续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。

嗯好的,那个主要是在发生例如网络环境改变或者连接被中断重连时,CurlEasy没有提供一个回调给外面直接就进行重试了,因为下载请求涉及ContentRange,重复请求会导致下载内容有问题

如果是这种需求,你可以在上层应用的时候,将retrycount设置为0,curl会在第一次失败就通知上层。

from curl-unity.

huiball avatar huiball commented on September 25, 2024

好的,明白了!

from curl-unity.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.