# OpcEndpointConfiguration Members

> Reference: Represents the limits and timeouts used to communicate with an endpoint (see Configuration).

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcEndpointConfiguration</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</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>

## Constructors

### OpcEndpointConfiguration

Initializes a new instance of the [OpcEndpointConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/) class using the default values of the OPC UA stack.

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

```csharp
public OpcEndpointConfiguration()
```

</div>

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

```vbnet
Public Sub New()
```

</div>

**Remarks**

The default values of the OPC UA stack differ from those of [OpcTransport](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/), e.g. the [ChannelLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/members#channellifetime) is 2 minutes instead of [DefaultChannelLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultchannellifetime). Use [From](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/members#from) to use the values of an application.

## Properties

### ChannelLifetime

Gets or sets the lifetime of a secure channel in milliseconds.

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

```csharp
public int ChannelLifetime { get; set; }
```

</div>

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

```vbnet
Public Property ChannelLifetime As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The lifetime of a secure channel in milliseconds.

### MaxArrayLength

Gets or sets the maximum length of an array encoded in a message body.

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

```csharp
public int MaxArrayLength { get; set; }
```

</div>

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

```vbnet
Public Property MaxArrayLength As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The maximum number of elements of an array.

### MaxBufferSize

Gets or sets the maximum size of the buffer to use when sending messages.

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

```csharp
public int MaxBufferSize { get; set; }
```

</div>

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

```vbnet
Public Property MaxBufferSize As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The maximum size of the buffer in bytes.

### MaxByteStringLength

Gets or sets the maximum length of a byte string encoded in a message body.

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

```csharp
public int MaxByteStringLength { get; set; }
```

</div>

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

```vbnet
Public Property MaxByteStringLength As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The maximum length of a byte string in bytes.

### MaxMessageSize

Gets or sets the maximum length of a message body in bytes.

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

```csharp
public int MaxMessageSize { get; set; }
```

</div>

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

```vbnet
Public Property MaxMessageSize As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The maximum length of a message body in bytes.

### MaxStringLength

Gets or sets the maximum length of a string encoded in a message body.

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

```csharp
public int MaxStringLength { get; set; }
```

</div>

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

```vbnet
Public Property MaxStringLength As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The maximum length of a string.

### OperationTimeout

Gets or sets the timeout to use when sending requests in milliseconds.

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

```csharp
public int OperationTimeout { get; set; }
```

</div>

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

```vbnet
Public Property OperationTimeout As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The timeout of a request in milliseconds.

### SecurityTokenLifetime

Gets or sets the lifetime of a security token in milliseconds.

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

```csharp
public int SecurityTokenLifetime { get; set; }
```

</div>

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

```vbnet
Public Property SecurityTokenLifetime As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The lifetime of a security token in milliseconds.

### UseBinaryEncoding

Gets or sets a value indicating whether messages are encoded using the binary encoding.

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

```csharp
public bool UseBinaryEncoding { get; set; }
```

</div>

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

```vbnet
Public Property UseBinaryEncoding As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the binary encoding is used; otherwise the value false.

## Methods

### From

<span class="api-meta">static</span>

Creates an [OpcEndpointConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/) using the transport quotas of the `configuration` specified.

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

```csharp
public static OpcEndpointConfiguration From(
    OpcApplicationConfiguration configuration)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Function From(
    configuration As OpcApplicationConfiguration) As OpcEndpointConfiguration
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `configuration` | [OpcApplicationConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplicationconfiguration/) | The configuration of the application whose transport quotas are to be used. |

**Returns**

[OpcEndpointConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/)

A new [OpcEndpointConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointconfiguration/) using the transport quotas of the `configuration`, or the default values of the OPC UA stack if the configuration does not define transport quotas. The binary encoding is used in either case.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `configuration` is a null reference (Nothing in Visual Basic). |
