public BinaryWebSocketMiddleware(BWSOptions options, NetworkComponent networkComponent, RequestDelegate next) { this.options = options; this.next = next; this.networkComponent = networkComponent; }
public static IApplicationBuilder UseBinaryWebSockets(this IApplicationBuilder app, BWSOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } app.UseWebSockets(options); app.UseMiddleware <BinaryWebSocketMiddleware>(options); return(app); }