NSURLSession cannot reuse TCP connections in cellular network, but it can in WiFi network.

in instrument we can see in cellular network ,Every network request establishes a TCP connection. but in WiFi network,Only the first network request will establish a TCP connection, subsequent requests will not. This seriously affects the performance of our network requests, so why is it like this?

WiFi network:

cellular network:

Answered by Systems Engineer in 751443022

Right, this can happen if your device is in range of a better network path, such as Wi-Fi, to try and migrate to a Wi-Fi path instead of cellular to make sure that data is used on a non-expensive network for the user. So these connection will not be reused in hopes that they can be migrated to Wi-Fi in the future.

Accepted Answer

Right, this can happen if your device is in range of a better network path, such as Wi-Fi, to try and migrate to a Wi-Fi path instead of cellular to make sure that data is used on a non-expensive network for the user. So these connection will not be reused in hopes that they can be migrated to Wi-Fi in the future.

If the WiFi switch is turned off and the device is always connected to cellular network, will the connection be reused?