Ejemplo n.º 1
0
 public WebSocketManagerMiddleware(RequestDelegate next,
                                   WebSocketHandler webSocketHandler)
 {
     _next             = next;
     _webSocketHandler = webSocketHandler;
 }
Ejemplo n.º 2
0
 public static IApplicationBuilder MapWebSocketManager(this IApplicationBuilder app, PathString path, WebSocketHandler handler)
 {
     return(app.Map(path, _app => _app.UseMiddleware <WebSocketManagerMiddleware>(handler)));
 }