修改encode编码接口
This commit is contained in:
parent
282276e80e
commit
87cae1312d
@ -49,7 +49,9 @@ public abstract class MessageData {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int messageLength();
|
||||
public int messageLength() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public ByteBuf encode() {
|
||||
final int messageLength = this.messageLength();
|
||||
@ -67,6 +69,7 @@ public abstract class MessageData {
|
||||
*
|
||||
* @param buf
|
||||
*/
|
||||
protected abstract void encode2(ByteBuf buf);
|
||||
protected void encode2(ByteBuf buf) {
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user