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