Browse Source

update smart-socket to 1.4.0-rc.9 (#4589)

* update dockerfile

* update to 1.0.10-SNAPSHOT

* update to 1.0.10-beta

* fix bug

* update to 1.0.10.1119-beta

* update to 1.0.10.1128-beta

* 还原代码

* update to 1.0.10.1206-beta

* update to 1.0.10.1209-beta

* update to 1.0.10.1214-beta

* 增加缓冲区

* update to 1.0.10-beta

* update to 1.0.10.1231-beta

* update to 1.0.10.0106-beta

* update to 1.0.0107-beta

* update to 1.0.10.0113-beta

* set new pageSize

* update smart-socket to 1.4.0-rc.2

* update to 1.4.0-rc.3

* update smart-socket to 1.4.0-rc.4

* update  to 1.0.10.0221-beta

* update smart-socket to 1.4.0-rc.5

* update maxCompletionHandlersOnStack

* config thread number

* update  to 1.0.10.0324-beta

* update smart-socket to 1.4.0-rc.9
三刀 6 years ago
parent
commit
07e306331e

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

@@ -22,11 +22,11 @@
             <groupId>org.smartboot.http</groupId>
             <artifactId>smart-http-server</artifactId>
         </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.smartboot.socket</groupId>-->
-            <!--<artifactId>aio-core</artifactId>-->
-            <!--<version>1.4.0-rc.5</version>-->
-        <!--</dependency>-->
+        <dependency>
+            <groupId>org.smartboot.socket</groupId>
+            <artifactId>aio-core</artifactId>
+            <version>1.4.0-rc.9</version>
+        </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>

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

@@ -21,9 +21,10 @@ public class Bootstrap {
     static byte[] body = "Hello, World!".getBytes();
 
     public static void main(String[] args) {
-        System.setProperty("smart-socket.server.pageSize", (16 * 1024 * 1024) + "");
-        System.setProperty("smart-socket.session.writeChunkSize", (1024 * 8) + "");
-        System.setProperty("sun.nio.ch.maxCompletionHandlersOnStack","2");
+        System.setProperty("smart-socket.server.pageSize", (512 * 1024) + "");
+        System.setProperty("smart-socket.bufferPool.pageNum", 512 + "");
+        System.setProperty("smart-socket.session.writeChunkSize", (1024 * 4) + "");
+//        System.setProperty("sun.nio.ch.maxCompletionHandlersOnStack","2");
         HttpMessageProcessor processor = new HttpMessageProcessor(System.getProperty("webapps.dir", "./"));
         processor.route("/plaintext", new HttpHandle() {