|
16 | 16 | import org.smartboot.http.server.HttpResponse;
|
17 | 17 | import org.smartboot.http.server.HttpServerHandler;
|
18 | 18 | import org.smartboot.http.server.handler.HttpRouteHandler;
|
19 |
| -import org.smartboot.http.server.impl.Request; |
20 |
| -import org.smartboot.socket.StateMachineEnum; |
21 |
| -import org.smartboot.socket.extension.processor.AbstractMessageProcessor; |
22 |
| -import org.smartboot.socket.transport.AioSession; |
23 | 19 |
|
24 | 20 | import javax.sql.DataSource;
|
25 | 21 | import java.io.IOException;
|
@@ -55,22 +51,10 @@ public void handle(HttpRequest request, HttpResponse response) throws IOExceptio
|
55 | 51 | HttpBootstrap bootstrap = new HttpBootstrap();
|
56 | 52 | bootstrap.configuration()
|
57 | 53 | .threadNum(cpuNum)
|
58 |
| - .headerLimiter(0) |
59 | 54 | .readBufferSize(1024 * 4)
|
60 | 55 | .writeBufferSize(1024 * 4)
|
61 | 56 | .readMemoryPool(16384 * 1024 * 4)
|
62 |
| - .writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum) |
63 |
| - .messageProcessor(processor -> new AbstractMessageProcessor<>() { |
64 |
| - @Override |
65 |
| - public void process0(AioSession session, Request msg) { |
66 |
| - processor.process(session, msg); |
67 |
| - } |
68 |
| - |
69 |
| - @Override |
70 |
| - public void stateEvent0(AioSession session, StateMachineEnum stateMachineEnum, Throwable throwable) { |
71 |
| - processor.stateEvent(session, stateMachineEnum, throwable); |
72 |
| - } |
73 |
| - }); |
| 57 | + .writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum); |
74 | 58 | bootstrap.httpHandler(routeHandle).setPort(8080).start();
|
75 | 59 | }
|
76 | 60 |
|
|
0 commit comments