Comments (8)
能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?
from curl-unity.
能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?
目前只锁了workingEasies,但是Lib的操作好像也有多线程问题。
简单改了下例子里的ResumeDownload.cs,反复点几次开始暂停就能复现了。
from curl-unity.
另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里
from curl-unity.
能否提供可复现的工程。你提到的几个函数(除了CleanUp)都已经有锁,你是怎么改的呢?
提了个pr,你看下我是这么改了下测试了下没啥问题了
from curl-unity.
另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里
续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。
from curl-unity.
另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里
续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。
嗯好的,那个主要是在发生例如网络环境改变或者连接被中断重连时,CurlEasy没有提供一个回调给外面直接就进行重试了,因为下载请求涉及ContentRange,重复请求会导致下载内容有问题
from curl-unity.
另外还有一个问题,貌似CurlEasy在下载途中如果遇到中断连接之类的需要retry的情况,重新下载时没有考虑续传,而是从头请求了。这里最好能获取下当前已经完成的部分。OnMultiPerform那里
续传属于上层应用逻辑,底层不做处理。Curl不只是用来做下载用的,更多的时候用来做HTTP API请求。
嗯好的,那个主要是在发生例如网络环境改变或者连接被中断重连时,CurlEasy没有提供一个回调给外面直接就进行重试了,因为下载请求涉及ContentRange,重复请求会导致下载内容有问题
如果是这种需求,你可以在上层应用的时候,将retrycount设置为0,curl会在第一次失败就通知上层。
from curl-unity.
好的,明白了!
from curl-unity.
Related Issues (13)
- 运行失败 HOT 1
- 请问怎么在下载进行中修改限速呢?直接设置SetOpt编辑器好用,安卓真机不好用 HOT 4
- CurlEasy.cs 里 ProgressFunction的参数类型是否应该是long? HOT 2
- 关于使用CurlMulti多线程下载的问题 HOT 2
- 设置最大下载速度接口在Android模拟器上无效
- PC端正常运行 ,android端运行异常 HOT 5
- xcode build报错 HOT 4
- Update curl to 7.64.1 HOT 8
- armeabi-v7a Android device CURLOPT_HEADERFUNCTION failed. HOT 4
- Never recieving messages to stream (half-open connection). HOT 8
- Send continuous stream to endpoint HOT 3
- 例子ResumeDownload.cs里,rangeEnd范围好像写错了,多了1byte HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-unity.