Partager via


IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext) Méthode

Définition

Tente de mettre à niveau la demande vers un WebSocket. Vérifiez IsWebSocketRequest avant d’appeler ceci.

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)

Paramètres

Retours

Un WebSocket.

S’applique à