public WebSocketMiddleware(RequestDelegate next, WebSocketHandler handler) { _next = next; _handler = handler; }
public static IApplicationBuilder MapSockets(this IApplicationBuilder app, PathString path, WebSocketHandler socket) { return(app.Map(path, (x) => x.UseMiddleware <WebSocketMiddleware>(socket))); }