Pavel Punsky
2014-05-07 07:28:20 UTC
When switching iOS device to Airplane mode (no WiFI, Cellular and Bluetooth - this is important as it simulates loss of connectivity like in elevators) there is no error from asio regarding TCP sockets.
Everything looks good as usual - TCP writes succeed, no reads are called. UDP on the other hand does return errors on send.
An error is raised 5 minutes later on TCP socket timeout.
I tried setting lower timeout for receive/send but with no success. Other mobile platforms behave as expected - error is raised as soon as network connection is lost.
Is there a way to overcome this?
There is a way to overcome it by listening to iOS events that notify about changes in network connectivity - in my case that would be a big change in architecture for this specific issue on a single platform. I'll keep it as last resort.
Looking forward for any advice
Everything looks good as usual - TCP writes succeed, no reads are called. UDP on the other hand does return errors on send.
An error is raised 5 minutes later on TCP socket timeout.
I tried setting lower timeout for receive/send but with no success. Other mobile platforms behave as expected - error is raised as soon as network connection is lost.
Is there a way to overcome this?
There is a way to overcome it by listening to iOS events that notify about changes in network connectivity - in my case that would be a big change in architecture for this specific issue on a single platform. I'll keep it as last resort.
Looking forward for any advice