Переглянути джерело

[ci fw-only Java/t-io] update tio to 3.0.8 (#3902)

Green Luo 7 роки тому
батько
коміт
2f65a04a3e

+ 1 - 1
frameworks/Java/t-io/README.md

@@ -10,7 +10,7 @@ These implementations use the t-io's controller.
 
 
 ## Versions
-3.0.7.v20180628-RELEASE (https://gitee.com/tywo45/t-io)
+3.0.8.v20180630-RELEASE (https://gitee.com/tywo45/t-io)
 
 ## Test URLs
 

+ 1 - 1
frameworks/Java/t-io/pom.xml

@@ -8,7 +8,7 @@
 	<parent>
 		<groupId>org.t-io</groupId>
 		<artifactId>tio-http-parent</artifactId>
-		<version>3.0.7.v20180628-RELEASE</version>
+		<version>3.0.8.v20180630-RELEASE</version>
 	</parent>
 
 	<properties>

+ 2 - 0
frameworks/Java/t-io/src/main/java/org/tio/http/server/benchmark/controller/TestController.java

@@ -22,11 +22,13 @@ public class TestController {
 	
 	@RequestPath(value = "json")
 	public HttpResponse json(HttpRequest request) throws Exception {
+		request.channelContext.groupContext.useQueueSend = false;
 		return Resps.json(request, new Message(HELLO_WORLD));
 	}
 
 	@RequestPath(value = "plaintext")
 	public HttpResponse plaintext(HttpRequest request) throws Exception {
+		request.channelContext.groupContext.useQueueSend = true;
 		return Resps.bytesWithContentType(request, HELLO_WORLD_BYTES, MimeType.TEXT_PLAIN_TXT.getType());
 	}
 }

+ 0 - 7
frameworks/Java/t-io/src/main/java/org/tio/http/server/benchmark/init/HttpServerInit.java

@@ -1,7 +1,5 @@
 package org.tio.http.server.benchmark.init;
 
-import org.tio.core.PacketHandlerMode;
-import org.tio.core.TcpConst;
 import org.tio.http.common.HttpConfig;
 import org.tio.http.common.handler.HttpRequestHandler;
 import org.tio.http.server.HttpServerStarter;
@@ -35,11 +33,6 @@ public class HttpServerInit {
 
 		httpServerStarter = new HttpServerStarter(httpConfig, requestHandler);
 		serverGroupContext = httpServerStarter.getServerGroupContext();
-		serverGroupContext.setReadBufferSize(TcpConst.MAX_DATA_LENGTH);
-		String mode = System.getProperty("packet.handler.mode");
-		if ("queue".equalsIgnoreCase(mode)) {
-			serverGroupContext.setPacketHandlerMode(PacketHandlerMode.QUEUE);
-		}
 		httpServerStarter.start();
 	}
 }