DefaultHubLifetimeManager<THub>.OnConnectedAsync(HubConnectionContext) 方法

定义

启动连接时调用。

public:
 override System::Threading::Tasks::Task ^ OnConnectedAsync(Microsoft::AspNetCore::SignalR::HubConnectionContext ^ connection);
public override System.Threading.Tasks.Task OnConnectedAsync (Microsoft.AspNetCore.SignalR.HubConnectionContext connection);
override this.OnConnectedAsync : Microsoft.AspNetCore.SignalR.HubConnectionContext -> System.Threading.Tasks.Task
Public Overrides Function OnConnectedAsync (connection As HubConnectionContext) As Task

参数

connection
HubConnectionContext

连接。

返回

Task

Task表示异步连接的。

适用于