How long does the client stay connected. From what I remember the KeepAlive
option was designed for long running connections such as those used by
Telnet and is only sent every couple of hours or so. Although it is possible
to bring this time down. There is some problem with changing the value
though but I can't quite remember what. I think it might that if you chnage
it the change is global i.e. affects all of the TCP connections. The advice
I have seen is to implment your own ping mechanism which kicks in once the
connection has been idle for a set period of time. If the two machines are
not directly connected i.e. there are routers/repeaters/gateways between the
two machines then this could indicate a problem with the router. Which could
be dropping what it thinks of as an idle connection in favour of something
more active.
A good refeence book on TCP/IP is
TCP/IP Illustrated Volume 1: The Protocols
W. Richard Stevens
Addison Wesley Professional Computing Series
0-201-63346-9
Paul.
"Kalpesh Modha" <ka***********@btinternet.com> wrote in message
news:ON**************@TK2MSFTNGP12.phx.gbl...
Hello.
I sometimes get this error message "An existing connection was forcibly
closed by the remote host" for no reason what so ever in my program. I
was wondering keepalives would help in this matter. My program runs fine and
then all of a sudden the client dies and this message is what is left in
the server logs.
If I was to enable keepalive would the server and client both need it
enabling in the programs ? or just the client ? or just the server ?
If any has any ideas why this would happen let me know.
Thanks
Kalpesh Modha
Ps VS 2003, .NET 1.1 Sp1 Windows xp pro Sp2,