My client-server program seemed to work fine, I could send and receive messages.
But if I don't send any messages for a while (sometimes 2 minutes is enough, other times it takes an hour..) and then try to send one, I get the error "Software caused connection abort: recv failed" on this line:
ins = new BufferedReader(new InputStreamReader(_sock.getInputStream()));
and _sock being
Socket _sock = null; _sock = serv_sock.accept();
I modified my code to send something every minute and it the same problem hasn't happened again.
Why did I get that error?
Is it a windows/network thing that closes tcp streams if inactive?
Can that even be it? Since the duration varied - a lot.
Or perhaps its readLine() or a Socket issue?