This commit is contained in:
地平线
2015-03-16 18:55:36 +08:00
parent 935f52e9df
commit d81461ccc2
27 changed files with 424 additions and 617 deletions

View File

@@ -5,7 +5,7 @@
*/
package com.wentch.redkale.net;
import java.nio.ByteBuffer;
import java.nio.*;
import java.util.*;
/**
@@ -29,7 +29,7 @@ public abstract class Request {
}
/**
* 返回值: -1数据不合法 0解析完毕 >0: 需再读取的字节数。
* 返回值:Integer.MIN_VALUE: 帧数据; -1数据不合法 0解析完毕 >0: 需再读取的字节数。
*
* @param buffer
* @return
@@ -38,6 +38,8 @@ public abstract class Request {
protected abstract void readBody(ByteBuffer buffer);
protected abstract void prepare();
protected void recycle() {
createtime = 0;
keepAlive = false;