HttpContextBase.AcceptWebSocketRequest 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中实现时,接受 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
选项对象。