HttpContext.AcceptWebSocketRequest Metode

Definisi

AspNetWebSocket Menerima permintaan.

Overload

Nama Deskripsi
AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

AspNetWebSocket Menerima permintaan menggunakan fungsi pengguna yang ditentukan.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

AspNetWebSocket Menerima permintaan menggunakan fungsi pengguna dan objek opsi yang ditentukan.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

AspNetWebSocket Menerima permintaan menggunakan fungsi pengguna yang ditentukan.

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))

Parameter

userFunc
Func<AspNetWebSocketContext,Task>

Fungsi pengguna.

Pengecualian

Parameternya userFunc adalah null.

Permintaan bukan AspNetWebSocket permintaan.

Keterangan

Memanggil metode ini setara dengan memanggil AcceptWebSocketRequest metode kelebihan beban dan meneruskan nulloptions parameter.

Berlaku untuk

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

AspNetWebSocket Menerima permintaan menggunakan fungsi pengguna dan objek opsi yang ditentukan.

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)

Parameter

userFunc
Func<AspNetWebSocketContext,Task>

Fungsi pengguna.

options
AspNetWebSocketOptions

Objek opsi.

Pengecualian

Parameternya userFunc adalah null.

Permintaan bukan AspNetWebSocket permintaan.

Berlaku untuk