# OpcClientState Enum

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Defines the different states a client may enter.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public enum OpcClientState
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Enum OpcClientState
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [ValueType](https://learn.microsoft.com/dotnet/api/system.valuetype) → [Enum](https://learn.microsoft.com/dotnet/api/system.enum) → **OpcClientState**

## Remarks

For more details see [State](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/state) property.

## Fields

| Name | Value | Description |
|---|---|---|
| <a id="connected"></a>`Connected` | `2` | The client is connected to the server. The client also enters this state when a reconnect required a new session; in this case the subscriptions are created again on the server. |
| <a id="connecting"></a>`Connecting` | `1` | The client is establishing the connection to the server. |
| <a id="created"></a>`Created` | `0` | The client has been created and has not yet been connected. |
| <a id="disconnected"></a>`Disconnected` | `4` | The client is not connected to the server, because it has been disconnected, because connecting failed or because the connection broke down while the [ReconnectTimeout](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/reconnecttimeout) is not greater than 0. |
| <a id="disconnecting"></a>`Disconnecting` | `3` | The client is closing the connection to the server. |
| <a id="reconnected"></a>`Reconnected`<span class="api-meta">since v2.8</span> | `6` | The client has been reconnected to the server using its existing session. |
| <a id="reconnecting"></a>`Reconnecting`<span class="api-meta">since v2.8</span> | `5` | The connection to the server broke down and the client tries to reconnect within the [ReconnectTimeout](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/reconnecttimeout). |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
