The IdleTime property returns the current idle timeout
period, in seconds, for the client session. Setting this
property changes the current idle timeout for the client session.
This value determines how long a connection can remain idle between
requests before the control automatically closes and re-establishes
the underlying HTTP connection.
Idle time is used to balance performance and reliability. Reusing
an existing connection can reduce overhead and improve performance,
particularly when multiple requests are made in quick succession.
However, connections that remain idle for extended periods may be
closed by the server or by intermediate network infrastructure. When
the idle time is exceeded, the control will proactively establish a
new connection before sending the next request.
This property is distinct from the Timeout and CacheTime
properties. The Timeout property specifies how long the client
will wait for a response to a request before failing, while the
CacheTime property controls how long certain responses or
metadata may be reused without making a new request. The idle time
only affects how long an existing connection is retained between
requests.
If this property is set to zero, a new connection is established
for each request. In most cases, the default idle time provides a good
balance between performance and compatibility.
It is important to note that this setting only affects client-side
behavior. Increasing the idle time does not guarantee a server
will keep the connection open for that duration. Many servers will
close idle connections after a shorter period of time, in which case
the control will automatically reconnect as needed.