# OpcClientKeepAlive Class

<span class="api-meta">since v2.8</span>

<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>Members</dt>
<dd><a href="./members">OpcClientKeepAlive Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Provides keep-alive options used by a client to monitor an established connection and recover from unexpected disconnection.

## Syntax

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

```csharp
public class OpcClientKeepAlive
```

</div>

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

```vbnet
Public Class OpcClientKeepAlive
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → **OpcClientKeepAlive**

## Fields

| Name | Description |
|---|---|
| [DefaultInterval](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#defaultinterval)<span class="api-meta">static</span> | Represents the default interval value that is used by the OpcClientKeepAlive as initial value of the [Interval](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#interval) property. |

## Properties

| Name | Description |
|---|---|
| [Exception](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#exception) | Gets the exception information associated with the [Status](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#status) represented by the current OpcClientKeepAlive. |
| [Interval](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#interval) | Gets or sets the interval to control the period within the client shall "ping" the server to test (= keep alive) whether the connection is still established and working. |
| [IsActive](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#isactive) | Gets a value indicating whether the keep alive mechanism is active and works on a healthy and established connection. |
| [Message](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#message) | Gets a value which describes the most recent outcome of the keep alive mechanism. |
| [ServerState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#serverstate) | Gets a value indicating the most recent known state of the server. |
| [Status](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#status) | Gets the status information associated with the most recent outcome of the keep alive operation. |
| [Time](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#time) | Gets the time at which the server did respond on the most recent sent keep alive message. |

## Methods

| Name | Description |
|---|---|
| [OnUpdated](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#onupdated)<span class="api-meta">protected · virtual</span> | Raises the [Updated](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#updated) event of the OpcClientKeepAlive. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#tostring)<span class="api-meta">2 overloads</span> | Returns a string representing the most recent [Time](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#time) and [Message](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#message) offered by the most recent keep alive operation. |

## Events

| Name | Description |
|---|---|
| [Updated](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#updated) | Occurs when a keep alive cycle completed and therefore the [ServerState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#serverstate), [Time](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#time), [Exception](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#exception) and [Status](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientkeepalive/members#status) properties were updated accordingly. |

## Applies to

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