HttpContextWrapper.AcceptWebSocketRequest Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Accepts an AspNetWebSocket request.
Overloads
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) |
Accepts an AspNetWebSocket request using the specified user function. |
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) |
Accepts an AspNetWebSocket request using the specified user function and options object. |
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)
Accepts an AspNetWebSocket request using the specified user function.
public:
override void AcceptWebSocketRequest(Func<System::Web::WebSockets::AspNetWebSocketContext ^, System::Threading::Tasks::Task ^> ^ userFunc);
public override void AcceptWebSocketRequest (Func<System.Web.WebSockets.AspNetWebSocketContext,System.Threading.Tasks.Task> userFunc);
override this.AcceptWebSocketRequest : Func<System.Web.WebSockets.AspNetWebSocketContext, System.Threading.Tasks.Task> -> unit
Public Overrides Sub AcceptWebSocketRequest (userFunc As Func(Of AspNetWebSocketContext, Task))
Parameters
- userFunc
- Func<AspNetWebSocketContext,Task>
The user function.
Exceptions
The userFunc
parameter is null
.
The request is not an AspNetWebSocket request.
Applies to
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)
Accepts an AspNetWebSocket request using the specified user function and options object.
public:
override void AcceptWebSocketRequest(Func<System::Web::WebSockets::AspNetWebSocketContext ^, System::Threading::Tasks::Task ^> ^ userFunc, System::Web::WebSockets::AspNetWebSocketOptions ^ options);
public override void AcceptWebSocketRequest (Func<System.Web.WebSockets.AspNetWebSocketContext,System.Threading.Tasks.Task> userFunc, System.Web.WebSockets.AspNetWebSocketOptions options);
override this.AcceptWebSocketRequest : Func<System.Web.WebSockets.AspNetWebSocketContext, System.Threading.Tasks.Task> * System.Web.WebSockets.AspNetWebSocketOptions -> unit
Public Overrides Sub AcceptWebSocketRequest (userFunc As Func(Of AspNetWebSocketContext, Task), options As AspNetWebSocketOptions)
Parameters
- userFunc
- Func<AspNetWebSocketContext,Task>
The user function.
- options
- AspNetWebSocketOptions
The options object.
Exceptions
The userFunc
parameter is null
.
The request is not an AspNetWebSocket request.
Applies to
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for