I am trying to poll a socket on server side to check if client is still available. I checked a few threads here but nothing seems to work.
As I found out there is no direct way of checking that so I tried to perform write opperation to socket and... Java is writing to the socket (when the client is disconnected) and I get no exception where IOException is expected.
I set a thread that is supposed to perform polling sending packet each second. While sending to disconnected client after about a minute I get response that "operation timed out".
I also tried to mess around with socket setSoTimeout but it doens't work as expected either.
Anyone has any suggestions how to make it work?
Thank you very much in advance.
Best regards, Tom