I am using Socket connection to establish connections in my application. I have a problem when establishing the tunnel with the server: the connection is being closed automatically after 3 minutes for example so when trying again to get data after 3 or 4 minutes, I will have an exception in the inputStream and outputStream. But the thread that opened the connection will not through any kind of exception since I included a try{ ... } catch (Exception ex) { }.
Now the question is, How to keep alive the socket connection to not close at all?
I am using Socket connection to establish connections in my application. I have a
Share
This issue is disucsse over on BlackBerry support forums. It is important to remember that when using a portable connected wireless device there are many reasons the connection might go down, and having a short timeout may be beneficial in cases where the connection may not be reliable: