共用方式為


IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext) 方法

定義

嘗試將要求升級至 WebSocket 。 叫用此專案之前請先檢查 IsWebSocketRequest

public:
 System::Threading::Tasks::Task<System::Net::WebSockets::WebSocket ^> ^ AcceptAsync(Microsoft::AspNetCore::Http::WebSocketAcceptContext ^ context);
public System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket> AcceptAsync (Microsoft.AspNetCore.Http.WebSocketAcceptContext context);
abstract member AcceptAsync : Microsoft.AspNetCore.Http.WebSocketAcceptContext -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
Public Function AcceptAsync (context As WebSocketAcceptContext) As Task(Of WebSocket)

參數

傳回

WebSocket

適用於