Example #1
0
 public BinaryWebSocketMiddleware(BWSOptions options, NetworkComponent networkComponent, RequestDelegate next)
 {
     this.options          = options;
     this.next             = next;
     this.networkComponent = networkComponent;
 }
Example #2
0
        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);
        }