Search code examples
socketstcpkeep-alivenetmq

Is there a way to use TCP keepalive as an event?


Since I use TCP for connection I wonder if I could use keep-alive signal as notification source for my app. Namely I would like to detect disconnection state (for given socket) at client side and server side.

Is it possible? If yes -- how to do it? So far I found options to set keep-alive intervals and Monitor method, but I don't see a way how to make a notification out of it.

On server side I would like to have info which client went dead of course.


Solution

  • Is there a way to use TCP keepalive as an event?

    No. TCP keepalives are not seen by the application.