Browse Source

update to 1.0.7 (#4053)

* smart-socket 1.0

* smart-socket 1.0

* smart-socket 1.0.1

* smart-socket 1.0.1

* smart-socket 1.0.1

* smart-http 1.0.3

* smart-http 1.0.4

* update dockerfile

* v1.0.7
三刀 7 years ago
parent
commit
09d645070a

+ 1 - 1
frameworks/Java/smart-socket/pom.xml

@@ -9,7 +9,7 @@
     <parent>
     <parent>
         <groupId>org.smartboot.http</groupId>
         <groupId>org.smartboot.http</groupId>
         <artifactId>smart-http-parent</artifactId>
         <artifactId>smart-http-parent</artifactId>
-        <version>1.0.4</version>
+        <version>1.0.7</version>
     </parent>
     </parent>
     <properties>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

+ 3 - 4
frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java

@@ -50,10 +50,9 @@ public class Bootstrap {
     public static void http(MessageProcessor<Http11Request> processor) {
     public static void http(MessageProcessor<Http11Request> processor) {
         // 定义服务器接受的消息类型以及各类消息对应的处理器
         // 定义服务器接受的消息类型以及各类消息对应的处理器
         AioQuickServer<Http11Request> server = new AioQuickServer<>(8080, new HttpRequestProtocol(), processor);
         AioQuickServer<Http11Request> server = new AioQuickServer<>(8080, new HttpRequestProtocol(), processor);
-        server.setWriteQueueSize(2);
-        server.setFaster(true);
-        server.setReadBufferSize(256);
-        server.setThreadNum((int) (Runtime.getRuntime().availableProcessors() * 1.5));
+        server.setWriteQueueSize(1024);
+        server.setReadBufferSize(1024*4);
+//        server.setThreadNum((int) (Runtime.getRuntime().availableProcessors() * 2));
         try {
         try {
             server.start();
             server.start();
         } catch (IOException e) {
         } catch (IOException e) {