AdsClientConnectAndWaitAsync Method
Connects/Reconnects to the target address and waits until the IAdsConnection is disconnected asynchronously.
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
public Task ConnectAndWaitAsync(
AmsAddress address,
CancellationToken cancel
)Return Value
Task
A Task representing the asynchronous operation.
Remarks
This method is used for scenarios, where the ADSClient disconnects from other code asynchronously. When this method returns, the connection is already terminated and only additional cleanup code should be processed.