Closed bladeofgod closed 1 month ago
In my experience the httpMaximumConnectionsPerHost
property does not really work, as servers have different ways to implement this (and for example using HTTP/2 this is bypassed altogether, as multiple requests are carried over 1 connection). See for example this thread. The way I have implemented this is therefore on the client side, by counting the number of tasks that are active with a given host, and not scheduling new tasks if that number equals the maximum set - so I am not using httpMaximumConnectionsPerHost
at all.
In my experience the
httpMaximumConnectionsPerHost
property does not really work, as servers have different ways to implement this (and for example using HTTP/2 this is bypassed altogether, as multiple requests are carried over 1 connection). See for example this thread. The way I have implemented this is therefore on the client side, by counting the number of tasks that are active with a given host, and not scheduling new tasks if that number equals the maximum set - so I am not usinghttpMaximumConnectionsPerHost
at all.
I see, thanks for your reply. :)
Hello, i'm an android developer, and i recently read some article about Ios's NSURLSession-limit, and found out in
URLSessionConfiguration.background
way thehttpMaximumConnectionsPerHost
will limited at 6. So, i go checked your code and found it's used same function. I'm confuse if setmaxConcurrentByHost
ormaxConcurrent
on ios has will worked ? or , am I completely mistaken?