| David Schwartz 2006-11-22, 1:39 am |
|
sunny wrote:
> I have a question How can I detect that the connect is lost by modifier
> tcp server.
> If any one know how do that please tell me and is it have any article
> about this please tell me
It depends on two things:
1) What do you mean by "connect is lost"? Do you mean the TCP
connection has actually filed or errored? Or do you mean that data
would not make it from one end to the other if somoene tried to send
it?
2) What protocol are you using? (On top of TCP.)
Basically, every protocol layered on top of TCP has its own way to
detect a lost connection. TCP doesn't provide this capability
completely by itself, so it has to be done in a different way for each
protocol.
For example, the IRC protocol actually has each end send the other end
a message periodically. Failure to get this message tells you the
connection has been lost.
DS
|