WebSocketAcceptAdapter Class

This adapts the ASP.NET Core WebSocket Accept flow to match the OWIN WebSocket accept flow. This enables OWIN based components to use WebSockets on ASP.NET Core servers.

Namespace
Microsoft.AspNetCore.Owin
Assemblies
  • Microsoft.AspNetCore.Owin

Syntax

public class WebSocketAcceptAdapter
class Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter

Constructors

WebSocketAcceptAdapter(System.Collections.Generic.IDictionary<System.String, System.Object>, System.Func<Microsoft.AspNetCore.Http.WebSocketAcceptContext, System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>>)
public WebSocketAcceptAdapter(IDictionary<string, object> env, Func<WebSocketAcceptContext, Task<WebSocket>> accept)

Methods

AdaptWebSockets(System.Func<System.Collections.Generic.IDictionary<System.String, System.Object>, System.Threading.Tasks.Task>)
Return type:System.Func<System.Collections.Generic.IDictionary>
public static Func<IDictionary<string, object>, Task> AdaptWebSockets(Func<IDictionary<string, object>, Task> next)