Take the 2-minute tour ×  I have a Java network server running
online on a dedicated server, and I have an Android network
client written with Android SDK and java.  It's working fine if
the android device is connected with WIFI, but if I connect the
device using 3G, the socket is closed when I call: readInt()
from the client. It's not happening at the first call, but
later. It looks very random, and it's hard to explain, but it
may happen when there is no data too read any more (or not). The
exception is SocketException connection reset by peer.  I would
like to explain more specifically, but it is very hard to debug,
and to my point of view, it looks like an Android bug (not sure
about that). And that's why i'm asking this question. Because
for sure someone has encountered the same problem.  What could
be the difference between a WIFI connection and a 3G connection
for an android device, that would produce such a disconnection ?
What could possibly be a fix for this ?  Thanks if anyone can
help.  Edit: My 3