I’ve decided to have my client “ping” the server periodically so that I know the client is still alive. I’m using a Jetty server embedded in a Java application and I have a HttpServlet to handle the clients requests.
On the server side, how do I know when the client hasn’t “pinged” (sent a request) in a while?
Expanding on srini.venigalla’s answer, you could use something like this as a starting point.