# OpcTransport Members

> Reference: Provides transport options used by an application instance to control the behavior of the operation, communication and data flow between the opponent applications.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcTransport</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>

## Fields

### DefaultChannelLifetime

The default lifetime of a secure channel in milliseconds (10 minutes).

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

```csharp
public const int DefaultChannelLifetime = 600000
```

</div>

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

```vbnet
Public Const DefaultChannelLifetime As Integer = 600000
```

</div>

**Field value**

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

### DefaultMaxArrayLength

The default maximum length of an array encoded in a message body (64 KB).

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

```csharp
public const int DefaultMaxArrayLength = 65535
```

</div>

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

```vbnet
Public Const DefaultMaxArrayLength As Integer = 65535
```

</div>

**Field value**

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

### DefaultMaxBufferSize

The default maximum size of the buffer to use when sending messages (64 KB).

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

```csharp
public const int DefaultMaxBufferSize = 65535
```

</div>

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

```vbnet
Public Const DefaultMaxBufferSize As Integer = 65535
```

</div>

**Field value**

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

### DefaultMaxByteStringLength

The default maximum length of a byte string encoded in a message body (5 MB).

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

```csharp
public const int DefaultMaxByteStringLength = 5242880
```

</div>

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

```vbnet
Public Const DefaultMaxByteStringLength As Integer = 5242880
```

</div>

**Field value**

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

### DefaultMaxMessageSize

The default maximum length of a message body in bytes (10 MB).

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

```csharp
public const int DefaultMaxMessageSize = 10485760
```

</div>

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

```vbnet
Public Const DefaultMaxMessageSize As Integer = 10485760
```

</div>

**Field value**

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

### DefaultMaxStringLength

The default maximum length of string encoded in a message body (64 KB).

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

```csharp
public const int DefaultMaxStringLength = 65535
```

</div>

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

```vbnet
Public Const DefaultMaxStringLength As Integer = 65535
```

</div>

**Field value**

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

### DefaultOperationTimeout

The default timeout to use when sending requests in milliseconds (2 minutes).

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

```csharp
public const int DefaultOperationTimeout = 120000
```

</div>

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

```vbnet
Public Const DefaultOperationTimeout As Integer = 120000
```

</div>

**Field value**

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

### DefaultSecurityTokenLifetime

The default lifetime of a security token in milliseconds (60 minutes).

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

```csharp
public const int DefaultSecurityTokenLifetime = 3600000
```

</div>

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

```vbnet
Public Const DefaultSecurityTokenLifetime As Integer = 3600000
```

</div>

**Field value**

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

## 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the lifetime of a secure channel in milliseconds. The default value is [DefaultChannelLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultchannellifetime). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultChannelLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultchannellifetime).

### 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the max length of an array. The default value is [DefaultMaxArrayLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxarraylength). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultMaxArrayLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxarraylength).

### 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the maximum size of the buffer to use when sending messages. The default value is [DefaultMaxBufferSize](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxbuffersize). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultMaxBufferSize](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxbuffersize).

### 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the maximum length of a byte string encoded in a message body. The default value is [DefaultMaxByteStringLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxbytestringlength). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultMaxByteStringLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxbytestringlength).

### 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the maximum length of a message body in bytes. The default value is [DefaultMaxMessageSize](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxmessagesize). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultMaxMessageSize](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxmessagesize).

### MaxStringLength

Gets or sets the maximum length of 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the maximum length of string encoded in a message body. The default value is [DefaultMaxStringLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxstringlength). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultMaxStringLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultmaxstringlength).

### OperationTimeout

Gets or sets the default 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the default timeout to use when sending requests in milliseconds. The default value is [DefaultOperationTimeout](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultoperationtimeout). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultOperationTimeout](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultoperationtimeout).

### 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**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

A value indicating the lifetime of a security token in milliseconds. The default value is [DefaultSecurityTokenLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultsecuritytokenlifetime). Changing the value of this property to a null reference (Nothing in Visual Basic) will reset the value of this property to the [DefaultSecurityTokenLifetime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#defaultsecuritytokenlifetime).

## Methods

### Reset

Restores the default values used for the transport setup.

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

```csharp
public void Reset()
```

</div>

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

```vbnet
Public Sub Reset()
```

</div>
