Beispiel #1
0
 public WSMiddleware(RequestDelegate next,
                     WSHandler webSocketHandler)
 {
     _next             = next;
     _webSocketHandler = webSocketHandler;
 }
Beispiel #2
0
 public static IApplicationBuilder MapWebSocketManager(this IApplicationBuilder app,
                                                       PathString path,
                                                       WSHandler handler)
 {
     return(app.Map(path, (_app) => _app.UseMiddleware <WSMiddleware>(handler)));
 }