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
選項物件。