GCDAsyncsocket write works but server not responds on background

302 views Asked by At

I have a couple of apps that talk to each other through GCDAsynsockets

The problem I'm facing is that if the app is that if the server app is in background, it doesn't write back to the client app until it gets back on foreground

So the readtimeout of client waiting for the response fires the timeout.. but after this timeout, the server may get the data and return the response

so my question is, is there a way to cancel the write if I get the timeout (so I don't send it again) or is there a way to prevent that background issue?

I think it can happen in poor networks too, if the socket stays on router for so long or things like that..

thank you so much

0

There are 0 answers