ConnectionHandler.OnConnectedAsync(ConnectionContext) 方法

定义

在接受到终结点的新连接时调用。

public:
 abstract System::Threading::Tasks::Task ^ OnConnectedAsync(Microsoft::AspNetCore::Connections::ConnectionContext ^ connection);
public abstract System.Threading.Tasks.Task OnConnectedAsync (Microsoft.AspNetCore.Connections.ConnectionContext connection);
abstract member OnConnectedAsync : Microsoft.AspNetCore.Connections.ConnectionContext -> System.Threading.Tasks.Task
Public MustOverride Function OnConnectedAsync (connection As ConnectionContext) As Task

参数

返回

表示 Task 连接生存期的 。 任务完成后,连接完成。

适用于