Exemplo n.º 1
0
 public static IApplicationBuilder MapWebSockManager(this IApplicationBuilder app,
                                                     PathString path,
                                                     WebsockHandler handler)
 {
     WebsockController.Instance.SetHandler(handler);
     return(app.Map(path, a => a.UseMiddleware <WebsocketMiddleware>(handler)));
 }
Exemplo n.º 2
0
 public WebsocketMiddleware(RequestDelegate next, WebsockHandler webSocketHandler)
 {
     _next             = next;
     _webSocketHandler = webSocketHandler;
 }
Exemplo n.º 3
0
 internal void SetHandler(WebsockHandler handler)
 {
     _handler = handler;
 }