How can I tell that a NetTcp-based WCF connection was interrupted?

Posted by mafutrct on Stack Overflow See other posts from Stack Overflow or by mafutrct
Published on 2010-03-15T10:25:32Z Indexed on 2010/03/15 10:29 UTC
Read the original article Hit count: 182

Filed under:
|

A WCF service is based on NetTcpBinding. It may happen that the client silently vanishes, leaving the server thinking that it is still connected.

I'm currently using a thread that pings all connected client to see if they are still alive, and removes disconnected clients.

  • Is a ping thread the correct way to solve the issue, or is there a better, possibly event-based way?
  • Do I have to surround every code that communicates with the client by try/catch and remove it from the list of connected clients additionally?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about nettcpbinding