HttpContext.AcceptWebSocketRequest Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Akzeptiert eine AspNetWebSocket Anforderung.
Überlädt
| Name | Beschreibung |
|---|---|
| AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) |
Akzeptiert eine AspNetWebSocket Anforderung mithilfe der angegebenen Benutzerfunktion. |
| AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) |
Akzeptiert eine AspNetWebSocket Anforderung mithilfe der angegebenen Benutzerfunktion und des Optionsobjekts. |
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)
Akzeptiert eine AspNetWebSocket Anforderung mithilfe 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 der Übergabe null für den options Parameter.
Gilt für:
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)
Akzeptiert eine AspNetWebSocket Anforderung mithilfe der angegebenen Benutzerfunktion und des Optionsobjekts.
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 Optionsobjekt.
Ausnahmen
Der userFunc Parameter ist null.
Die Anforderung ist keine AspNetWebSocket Anforderung.