This commit is contained in:
Redkale
2018-04-17 13:46:30 +08:00
parent 754861e036
commit 826aaf0128
10 changed files with 64 additions and 13 deletions

View File

@@ -91,6 +91,9 @@ public abstract class Server<K extends Serializable, C extends Context, R extend
//请求包大小的上限,单位:字节
protected int maxbody;
//Keep-Alive IO读取的超时秒数小于1视为不设置
protected int aliveTimeoutSecond;
//IO读取的超时秒数小于1视为不设置
protected int readTimeoutSecond;
@@ -113,6 +116,7 @@ public abstract class Server<K extends Serializable, C extends Context, R extend
this.address = new InetSocketAddress(config.getValue("host", "0.0.0.0"), config.getIntValue("port", 80));
this.charset = Charset.forName(config.getValue("charset", "UTF-8"));
this.maxconns = config.getIntValue("maxconns", 0);
this.aliveTimeoutSecond = config.getIntValue("aliveTimeoutSecond", 0);
this.readTimeoutSecond = config.getIntValue("readTimeoutSecond", 0);
this.writeTimeoutSecond = config.getIntValue("writeTimeoutSecond", 0);
this.backlog = parseLenth(config.getValue("backlog"), 16 * 1024);