修改encode编码接口

This commit is contained in:
walker 2023-06-06 11:18:03 +08:00
parent 282276e80e
commit 87cae1312d

View File

@ -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) {
}
}