Example #1
0
 public WebsocketMiddleware(RequestDelegate next, IWSHandler handler)
 {
     _next    = next;
     _handler = handler;
 }
Example #2
0
 public static IApplicationBuilder MapWebsocket(this IApplicationBuilder app, PathString path, IWSHandler handler)
 {
     return(app.Map(path, x => x.UseMiddleware <WebsocketMiddleware>(handler)));
 }