mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-20 00:24:06 +00:00
fix[net]: 加一个注解ProtobufClass注解支持心跳包,要不然jprotobuf会报错
This commit is contained in:
@@ -13,12 +13,14 @@
|
||||
|
||||
package com.zfoo.net.packet.common;
|
||||
|
||||
import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
|
||||
import com.zfoo.protocol.IPacket;
|
||||
|
||||
/**
|
||||
* @author jaysunxiao
|
||||
* @version 3.0
|
||||
*/
|
||||
@ProtobufClass
|
||||
public class Heartbeat implements IPacket {
|
||||
|
||||
public static final transient short PROTOCOL_ID = 102;
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
|
||||
package com.zfoo.net.packet.common;
|
||||
|
||||
import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
|
||||
import com.zfoo.protocol.IPacket;
|
||||
|
||||
/**
|
||||
* @author jaysunxiao
|
||||
* @version 3.0
|
||||
*/
|
||||
@ProtobufClass
|
||||
public class Ping implements IPacket {
|
||||
|
||||
public static final transient short PROTOCOL_ID = 103;
|
||||
|
||||
@@ -13,12 +13,15 @@
|
||||
|
||||
package com.zfoo.net.packet.common;
|
||||
|
||||
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
|
||||
import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
|
||||
import com.zfoo.protocol.IPacket;
|
||||
|
||||
/**
|
||||
* @author jaysunxiao
|
||||
* @version 3.0
|
||||
*/
|
||||
@ProtobufClass
|
||||
public class Pong implements IPacket {
|
||||
|
||||
public static final transient short PROTOCOL_ID = 104;
|
||||
@@ -26,6 +29,7 @@ public class Pong implements IPacket {
|
||||
/**
|
||||
* 服务器当前的时间戳
|
||||
*/
|
||||
@Protobuf(order = 1)
|
||||
private long time;
|
||||
|
||||
public static Pong valueOf(long time) {
|
||||
|
||||
Reference in New Issue
Block a user