Session.ConnectAsync Method
Connects the session.
Namespace: TwinCAT
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 6.0.328+39e3229
Syntax
C#
public Task<IConnection> ConnectAsync(
CancellationToken cancel
)
Parameters
cancel |
Type: System.Threading.CancellationToken |
Exceptions
Exception |
Condition |
---|---|
Connection to '{this.AddressSpecifier}' couldn't be established! |
Remarks
The IConnection will be valid until the ISession is disconnected via the Disconnect. method or the Dispose method is called. Any possible resurrections after communication losses will be done transparently within the IConnection so that the IConnection instance and ISession instance remains.