HubLifetimeManager<THub>.OnConnectedAsync(HubConnectionContext) 方法

定义

在连接启动时调用。

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

参数

connection
HubConnectionContext

连接。

返回

表示 Task 异步连接的 。

适用于