Hi,
I can't find in the socket java API a way to close a inactive connection open for TIMEOUT millisecond. The goal is to avoid an embarassing error when I forget to close the socket explicitly (and force the distant resource to be rebooted).
If I don't find a low level method, I will add a last-time-used value to our connection, and check it periodically... but I find that ugly.
Thanks,
Antoine
P.S. I don't want the connection timeout, and I'm not sure to understand the setSoTimeout, but I'm quite sure it's not what we want.
P.P.S. Sure, avoid to forget the close is better, but in a big project + big teams...we try to find a 100% secure way.