HttpContext.AcceptWebSocketRequest HttpContext.AcceptWebSocketRequest HttpContext.AcceptWebSocketRequest HttpContext.AcceptWebSocketRequest Method

定義

接受 AspNetWebSocket 要求。Accepts an AspNetWebSocket request.

多載

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

接受使用指定之使用者函式的 AspNetWebSocket 要求。Accepts an AspNetWebSocket request using the specified user function.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

接受使用指定之使用者函式及選項物件的 AspNetWebSocket 要求。Accepts an AspNetWebSocket request using the specified user function and options object.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

接受使用指定之使用者函式的 AspNetWebSocket 要求。Accepts an AspNetWebSocket request using the specified user function.

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

參數

userFunc
Func<AspNetWebSocketContext,Task>

使用者函式。The user function.

例外狀況

userFunc 參數為 nullThe userFunc parameter is null.

備註

呼叫這個方法相當於呼叫AcceptWebSocketRequest方法多載, 並為null options參數傳遞。Calling this method is equivalent to calling the AcceptWebSocketRequest method overload and passing null for the options parameter.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions) AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

接受使用指定之使用者函式及選項物件的 AspNetWebSocket 要求。Accepts an AspNetWebSocket request using the specified user function and options object.

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

參數

userFunc
Func<AspNetWebSocketContext,Task>

使用者函式。The user function.

例外狀況

userFunc 參數為 nullThe userFunc parameter is null.

適用於