HttpContextBase.AcceptWebSocketRequest 方法

定义

在派生类中实现时,接受 AspNetWebSocket 请求。

重载

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

在派生类中实现时,接受使用指定用户函数的 AspNetWebSocket 请求。

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

在派生类中实现时,接受使用指定用户函数和选项对象的 AspNetWebSocket 请求。

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

在派生类中实现时,接受使用指定用户函数的 AspNetWebSocket 请求。

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

参数

userFunc
Func<AspNetWebSocketContext,Task>

用户函数。

适用于

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

在派生类中实现时,接受使用指定用户函数和选项对象的 AspNetWebSocket 请求。

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

参数

userFunc
Func<AspNetWebSocketContext,Task>

用户函数。

options
AspNetWebSocketOptions

选项对象。

适用于