Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何控制最大下载数? #8

Open
Nododo opened this issue Mar 9, 2021 · 0 comments
Open

如何控制最大下载数? #8

Nododo opened this issue Mar 9, 2021 · 0 comments

Comments

@Nododo
Copy link

Nododo commented Mar 9, 2021

目前想实现控制文件最大下载数,分析源码后目前有两个思路:

1.SJNetworkRequestEngine.m 第53行,通过这里设置

_sessionManager.operationQueue.maxConcurrentOperationCount = 5;

AFNetworking可以自行控制吗?还是会取消超过5个之外的请求?

2.SJNetworkRequestPool.h 第99行

-(NSInteger)currentRequestCount;
通过自己控制这个数量来实现

请问有更好的思路吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant