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表示非同步連接的。

適用於