HttpContext.AcceptWebSocketRequest Method (Func(Of AspNetWebSocketContext, Task), AspNetWebSocketOptions)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Accepts an AspNetWebSocket request using the specified user function and options object.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

Public Sub AcceptWebSocketRequest (
	userFunc As Func(Of AspNetWebSocketContext, Task),
	options As AspNetWebSocketOptions
)

Parameters

userFunc
Type: System.Func(Of AspNetWebSocketContext, Task)

The user function.

options
Type: System.Web.WebSockets.AspNetWebSocketOptions

The options object.

Exception Condition
ArgumentNullException

The userFunc parameter is null.

NotSupportedException

The request is not an AspNetWebSocket request.

.NET Framework
Available since 4.5
Return to top
Show: