HttpContext.AcceptWebSocketRequest Método

Definición

Acepta una solicitud AspNetWebSocket.

Sobrecargas

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

Acepta una solicitud AspNetWebSocket usando la función de usuario especificada.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

Acepta una solicitud AspNetWebSocket usando la función de usuario y el objeto de opciones especificados.

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>)

Acepta una solicitud AspNetWebSocket usando la función de usuario especificada.

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

Parámetros

userFunc
Func<AspNetWebSocketContext,Task>

Función de usuario.

Excepciones

El parámetro userFunc es null.

La solicitud no es una solicitud de AspNetWebSocket.

Comentarios

Llamar a este método equivale a llamar a la sobrecarga del AcceptWebSocketRequest método y pasar null para el options parámetro .

Se aplica a

AcceptWebSocketRequest(Func<AspNetWebSocketContext,Task>, AspNetWebSocketOptions)

Acepta una solicitud AspNetWebSocket usando la función de usuario y el objeto de opciones especificados.

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)

Parámetros

userFunc
Func<AspNetWebSocketContext,Task>

Función de usuario.

options
AspNetWebSocketOptions

Objeto de opciones.

Excepciones

El parámetro userFunc es null.

La solicitud no es una solicitud de AspNetWebSocket.

Se aplica a