This repository was archived by the owner on Jul 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/kttdevelopment/simplehttpserver/handler Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11package com .kttdevelopment .simplehttpserver .handler ;
22
3+ import com .kttdevelopment .simplehttpserver .HttpSession ;
34import com .kttdevelopment .simplehttpserver .SimpleHttpServer ;
45import com .sun .net .httpserver .HttpExchange ;
56
89
910public class ConnectionThrottler {
1011
11- private final SimpleHttpServer server ;
12+ private final HttpSession server ;
1213
1314 private final Predicate <HttpExchange > contributeToLimit ;
1415 private final AtomicInteger connections = new AtomicInteger (0 );
1516
1617 private int maxConnections = 0 ;
1718
18- public ConnectionThrottler (final SimpleHttpServer server ){
19+ public ConnectionThrottler (final HttpSession server ){
1920 this .server = server ;
2021 contributeToLimit = (exchange ) -> true ;
2122 }
2223
23- public ConnectionThrottler (final SimpleHttpServer server , final Predicate <HttpExchange > counts ){
24+ public ConnectionThrottler (final HttpSession server , final Predicate <HttpExchange > counts ){
2425 this .server = server ;
2526 this .contributeToLimit = counts ;
2627 }
You can’t perform that action at this time.
0 commit comments