Session.OnConnectAsync Method

Handler function connecting the Session.

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

Syntax

C#

protected virtual Task<IConnection?> OnConnectAsync(
    bool reconnect,
    CancellationToken cancel
)

Parameters

reconnect

Type: System.Boolean
if set to true [reconnect].

cancel

Type: System.Threading.CancellationToken
The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

Type: Task.IConnection.
Task<System.Nullable<IConnection>>.

Reference

Session Class

TwinCAT Namespace