---
title: "Ice.Connection.*"
url: https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Ice.Connection.\*

Parts of this page are for some programming languages only, and name them. For one language's text alone, see [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/ruby.md), and [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/swift.md).

The properties described on this page configure connections.

The `Ice.Connection.Client.*` properties configure outgoing connections created by a communicator.

In language mappings that accept incoming connections, the [adapter.Connection.\*](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties.md) properties configure these connections and default to the `Ice.Connection.Server.*` properties.

In the property descriptions below, replace `name` with `Client` or, in language mappings that accept incoming connections, with `Server`.

> **JavaScript**
>
> > **JavaScript**
> >
> > Ice for JavaScript does not support `Ice.Connection.Server.*` properties. Setting any of them throws `PropertyException`.

> **Note**
>
> These properties apply only to connections over connection-oriented transports such a TCP. They have no effect on UDP “connections”.

## Ice.Connection.*name*.CloseTimeout

`Ice.Connection.name.CloseTimeout=num` (in seconds)

A graceful connection closure transitions to connection abort if it takes more than `num` seconds to complete.

Setting `num` to `0` or less disables this timeout entirely.

The default close timeout is 10 seconds.

## Ice.Connection.*name*.ConnectTimeout

`Ice.Connection.name.ConnectTimeout=num` (in seconds)

A connection establishment fails if it takes more than `num` seconds to complete.

Setting `num` to `0` or less disables this timeout entirely.

The default connect timeout is 10 seconds.

## Ice.Connection.*name*.EnableIdleCheck

`Ice.Connection.name.EnableIdleCheck=num`

When `num` is greater than `0`, the communicator or object adapter performs the connection idle check described in [Ice.Connection.name.IdleTimeout](#ice.connection.name.idletimeout). Otherwise, no idle check is performed.

The default value for `num` is `1`.

## Ice.Connection.*name*.IdleTimeout

`Ice.Connection.name.IdleTimeout=num` (in seconds)

Once a connection is established, this connection is considered healthy as long as it does not wait for more than `num` seconds to read a byte. If a connection waits for more than `num` seconds to read a byte, it's deemed idle and aborted when the idle check is enabled (see [Ice.Connection.name.EnableIdleCheck](#ice.connection.name.enableidlecheck)).

Idle is never a good state. To prevent connections from becoming idle and getting aborted by the idle check, Ice generates regular write activity on established connections: if there is no write on a connection for `num / 2` seconds, Ice sends a heartbeat on this connection. A heartbeat is a oneway, unacknowledged, `ValidateConnection` message.

Setting `num` to `0` or less disables the idle check and the sending of heartbeats. This is not a recommended configuration.

The default idle timeout is 60 seconds.

> **Note**
>
> We recommend you use the same idle timeout for all clients and servers in your application. The default value (60 seconds) should be appropriate for most applications.

## Ice.Connection.*name*.InactivityTimeout

`Ice.Connection.name.InactivityTimeout=num` (in seconds)

A connection is considered inactive when there is no application-level activity on this connection: there is no outstanding invocation (we're not waiting for a response to a request we've sent), there is no outstanding dispatch, and no request or response is queued for sending, being sent, or being received. Sending or receiving a heartbeat does not count as application-level activity. When a connection remains inactive for more than `num` seconds, this connection is closed gracefully.

Inactive is a good state: the connection is healthy but unused, so the communicator or object adapter shuts it down to reclaim resources.

Setting `num` to `0` or less disables the timeout entirely.

The default inactivity timeout is 300 seconds.

> **Warning**
>
> Make sure your inactivity timeout is greater than your idle timeout, as the implementation of the inactivity timeout relies on a smaller idle timeout value. If you disable the idle timeout by setting it to `0` or very large value (not something we recommend), you will effectively disable the inactivity timeout as well.

> **C++, C#, Java, MATLAB, PHP, Python, Ruby, and Swift**
>
> ## Ice.Connection.*name*.MaxDispatches
>
> `Ice.Connection.name.MaxDispatches=num`
>
> Configures the maximum number of requests that a connection can dispatch concurrently. Once this limit is reached, the connection stops reading new requests off its underlying transport connection.
>
> The limit is infinite when `num` is `0` or less.
>
> The default max dispatches is `100`.
