Пример #1
0
 public WebSocketMiddleware(RequestDelegate next, WebSocketHandler handler)
 {
     _next    = next;
     _handler = handler;
 }
Пример #2
0
 public static IApplicationBuilder MapSockets(this IApplicationBuilder app, PathString path, WebSocketHandler socket)
 {
     return(app.Map(path, (x) => x.UseMiddleware <WebSocketMiddleware>(socket)));
 }