HttpContext.AcceptWebSocketRequest Methode

Definition

Akzeptiert eine AspNetWebSocket Anforderung.

Überlädt

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

Akzeptiert eine AspNetWebSocket Anforderung unter Verwendung der angegebenen Benutzerfunktion.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

Akzeptiert eine AspNetWebSocket-Anforderung mit dem angegebenen Benutzerfunktions- und Options-Objekt.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

Akzeptiert eine AspNetWebSocket Anforderung unter Verwendung der angegebenen Benutzerfunktion.

public:
 void AcceptWebSocketRequest(Func<System::Web::WebSockets::AspNetWebSocketContext ^, System::Threading::Tasks::Task ^> ^ userFunc);
public void AcceptWebSocketRequest (Func<System.Web.WebSockets.AspNetWebSocketContext,System.Threading.Tasks.Task> userFunc);
member this.AcceptWebSocketRequest : Func<System.Web.WebSockets.AspNetWebSocketContext, System.Threading.Tasks.Task> -> unit
Public Sub AcceptWebSocketRequest (userFunc As Func(Of AspNetWebSocketContext, Task))

Parameter

userFunc
Func<AspNetWebSocketContext,Task>

Die Benutzerfunktion.

Ausnahmen

Der userFunc-Parameter ist null.

Die Anforderung ist keine AspNetWebSocket-Anforderung.

Hinweise

Das Aufrufen dieser Methode entspricht dem Aufrufen der AcceptWebSocketRequest Methodenüberladung und dem Übergeben null für den options Parameter.

Gilt für

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

Akzeptiert eine AspNetWebSocket-Anforderung mit dem angegebenen Benutzerfunktions- und Options-Objekt.

public:
 void AcceptWebSocketRequest(Func<System::Web::WebSockets::AspNetWebSocketContext ^, System::Threading::Tasks::Task ^> ^ userFunc, System::Web::WebSockets::AspNetWebSocketOptions ^ options);
public void AcceptWebSocketRequest (Func<System.Web.WebSockets.AspNetWebSocketContext,System.Threading.Tasks.Task> userFunc, System.Web.WebSockets.AspNetWebSocketOptions options);
member this.AcceptWebSocketRequest : Func<System.Web.WebSockets.AspNetWebSocketContext, System.Threading.Tasks.Task> * System.Web.WebSockets.AspNetWebSocketOptions -> unit
Public Sub AcceptWebSocketRequest (userFunc As Func(Of AspNetWebSocketContext, Task), options As AspNetWebSocketOptions)

Parameter

userFunc
Func<AspNetWebSocketContext,Task>

Die Benutzerfunktion.

options
AspNetWebSocketOptions

Das Options-Objekt.

Ausnahmen

Der userFunc-Parameter ist null.

Die Anforderung ist keine AspNetWebSocket-Anforderung.

Gilt für