so I know that in the old AFNetworking this was possible using the AFHTTPClient,
and I know that if I use AFHTTPRequestOperationManager I can set the queue's limit, but I can't make AFHTTPSessionManager to run only x requests at a time without implementing it by myself using the success block (which I don't want to).
The following code did NOT limit my connections:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.operationQueue.maxConcurrentOperationCount = 1;
In line with an interesting discussion here, I have a lot of requests to my server and I choke it until I get timeouts, so I really need to limit my concurrent connections.
What am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…