AcceptWebSocketRequest Method (Func(AspNetWebSocketContext, Task))
Collapse the table of content
Expand the table of content

HttpContext.AcceptWebSocketRequest Method (Func<AspNetWebSocketContext, Task>)

.NET Framework (current version)
 

Accepts an AspNetWebSocket request using the specified user function.

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

public void AcceptWebSocketRequest(
	Func<AspNetWebSocketContext, Task> userFunc
)

Parameters

userFunc
Type: System.Func<AspNetWebSocketContext, Task>

The user function.

Exception Condition
ArgumentNullException

The userFunc parameter is null.

NotSupportedException

The request is not an AspNetWebSocket request.

Calling this method is equivalent to calling the AcceptWebSocketRequest method overload and passing null for the options parameter.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft