3.2.2 Timers

A TDS 4.2 client SHOULD implement the following timers:

  • Connection Timer. Controls the maximum time spent during the establishment of a TDS 4.2 connection. The default Connection time-out value SHOULD be 15 seconds. The implementation SHOULD allow the upper layer to specify a nondefault value, including an infinite value (for example no time-out).

  • Client Request Timer. Controls the maximum time spent waiting for a message response from the server for a client request sent after the connection has been established. The TDS 4.2 protocol does not impose any restriction on the Client request time-out value. The implementation SHOULD allow the upper layer to specify a nondefault value, including an infinite value (for example, no time-out).

  • Cancel Timer. Controls the maximum time spent waiting for a message cancellation acknowledgement after an Attention request is sent to the server. The TDS 4.2 protocol does not impose any restriction on the Cancel time-out value. The implementation SHOULD allow the upper layer to specify a nondefault value, including an infinite value (for example, no time-out).

If a TDS 4.2 client implementation implements any of the timers, it MUST implement their behavior according to this specification.

A TDS 4.2 client SHOULD request the transport to detect and indicate a broken connection if the transport provides this mechanism. If the transport used is TCP, it SHOULD use the TCP keep-alives (for more details, see [RFC1122]) in order to detect a nonresponding server if infinite connection time-out or infinite client request time-out is used. The default values of the TCP keep-alive values set by a TDS 4.2 client are 30 seconds of no activity until the first keep-alive packet is sent and 1 second between when successive keep-alive packets are sent if no acknowledgement is received. The implementation SHOULD allow the upper layer to specify other TCP keep-alive values.