AdsServer.ConnectServerAndWaitAsync Method

Registers the AdsServer at the router asynchronously.

Namespace:  TwinCAT.Ads.Server
Assembly:  TwinCAT.Ads.Server (in TwinCAT.Ads.Server.dll) Version: 6.0.328+39e3229

Syntax

C#

public Task<AdsErrorCode> ConnectServerAndWaitAsync(
    CancellationToken cancel
)

Parameters

cancel

Type: System.Threading.CancellationToken

Return Value

Type: Task.AdsErrorCode.
Returns a task object that represents the ConnectServerAndWaitAsync(CancellationToken) operation which returns an AdsErrorCode" as result..

Remarks

The connection is hold until a cancel is requested, that means this method will wait until disconnect.

Reference

AdsServer Class

TwinCAT.Ads.Server Namespace