I'm currently implementing some logic for reading from TCP socket in the background mode.
CFReadStreamRead
function is being used to fetch some data from socket and for now everything works fine.
But I'm wondering how iPhone OS 4.x treats blocking I/O operations in the background mode. For example: CFReadStreamRead
function may block for hours while waiting for some incoming data.
Are there any official constraints like 10 minutes for the background tasks? Will my application be killed by iPhone OS for the case of long-running blocking I/O operation?
Please note - I'm not running the blocking I/O function in the background task. Code itself is situated inapplicationDidEnterBackground
method of myUIApplicationDelegate
.
Application itself is configured with "voip" parameter in Info.plst file + CFReadStream is configured according to the recommendations of Apple withkCFStreamNetworkServiceTypeVoIP
parameter.
So basically this is a regular scenario of VoIP application in the background mode.
Thanks!