This content has been marked as final. Show 5 replies
835062 wrote:Sure thing!
is it necessary @ os registry level such as keepAliveTime/keepAliveInterval parameters
Whenever I encounter a problem with a Java program, the first thing I do is go through the operating system settings.
If I can't find or break anything there, I go to the garage and work on my car.
If you want any serious help, you're going to need to explain your problem better. Your explanation of "server shows disconnected but client shows connected" is completely useless.
My first suspicion is that the server thinks the connection is closed because of lack of activity. If it thinks the connection's closed, it's certainly not going to send a message to the client saying "I can't talk to you any more." It will more than likely just silently close the socket. Since the client's not hearing anything from the server, it may assume everything is still OK & that the connection is open (a bad assumption).
The only way to keep the server & client on the same page, so to speak, would be to use some kind of keep-alives during periods of inactivity. Otherwise, one side or the other may conclude that silence means the connection is closed. How you implement this depends on what protocol (if any) you're using. If you're not using some standard protocol, you'll probably have invent one that both the server & client agree on.