/// <summary> /// Registers WebSocketMiddleware. /// </summary> public static IApplicationBuilder MapWebSocketManager(this IApplicationBuilder app, PathString path, WebsocketEndpoint handler) { return(app.Map( pathMatch: path, configuration: _app => _app.UseMiddleware <WebSocketMiddleware>(handler))); }
public WebSocketMiddleware(RequestDelegate next, WebsocketEndpoint session) { this.next = next; this.session = session; }