public static IApplicationBuilder MapSokets(this IApplicationBuilder application, PathString path, SocketHandlers socket) { return(application.Map(path, (x) => x.UseMiddleware <SocketMiddleware>(socket))); }
public SocketMiddleware(RequestDelegate next, SocketHandlers handlers) { _next = next; Handler = handlers; }