Wilfried Mestdagh wrote: > Hello Dod, > >> The connection will be >> aborted after the number of retransmissions specified by >> TcpMaxDataRetransmissions have gone unanswered. > > Does this means that there should be also a property > TcpMaxDataRetransmissions ?
This isn't a property but a registry key. > > And I also think this will have impact if there is many packet loss. Or > do I miss something ? I do not know. But it's rather simple, using a sniffer like Ethereal you can watch what's going on in the network. After KeepAliveTime has expired the so configured socket sends the first keep-alive packet. If it doesn't get back an ACK it sends the next keep-alive packet when then KeepAliveInterval has expired. This is repeated until TcpMaxDataRetransmissions has been reached, then the connection is aborted. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > > --- > Rgds, Wilfried [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > http://www.mestdagh.biz > > Wednesday, March 8, 2006, 10:13, Dod wrote: > >> Hello, > >> About KeepAlive, here is what I found in a old TCP-IP NT5.0 white >> paper from Microsoft. > > >> TCP Keep-alive Messages > >> A TCP keep-alive packet is simply an ACK with the sequence number set >> to one less than the current sequence number for the connection. A >> host receiving one of these ACKs will respond with an ACK for the >> current sequence number. Keep-alives can be used to verify that the >> computer at the remote end of a connection is still available. TCP >> keep-alives can be sent once every KeepAliveTime (defaults to >> 7,200,000 milliseconds or two hours), if no other data or higher level >> keep-alives have been carried over the TCP connection. If there is no >> response to a keep-alive, it is repeated once every KeepAliveInterval >> seconds. KeepAliveInterval defaults to 1 second. NetBT connections, >> such as those used by many Microsoft networking components, send >> NetBIOS keep-alives more frequently, so normally no TCP keep-alives >> will be sent on a NetBIOS connection. TCP keep-alives are disabled by >> default, but Windows Sockets applications can use the SetSockOpt >> function to enable them. > >> Registry key start from : >> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ >> KeepAliveInterval >> Key: Tcpip\Parameters >> Value Type: REG_DWORD-Time in milliseconds >> Valid Range: 1-0xFFFFFFFF >> Default: 1000 (one second) >> Description: This parameter determines the interval between keep-alive >> retransmissions until a response is received. Once a response is >> received, the delay until the next keep-alive transmission is again >> controlled by the value of KeepAliveTime. The connection will be >> aborted after the number of retransmissions specified by >> TcpMaxDataRetransmissions have gone unanswered. > >> KeepAliveTime >> Key: Tcpip\Parameters >> Value Type: REG_DWORD-Time in milliseconds >> Valid Range: 1-0xFFFFFFFF >> Default: 7,200,000 (two hours) >> Description: The parameter controls how often TCP attempts to verify >> that an idle connection is still intact by sending a keep-alive >> packet. If the remote system is still reachable and functioning, it >> will acknowledge the keep-alive transmission. Keep-alive packets are >> not sent by default. This feature may be enabled on a connection by an >> application. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be