| File was renamed from ard-work/src/main/java/com/ard/tianyu/netty/command/register/HeartbeatReplyCommand.java |
| | |
| | | package com.ard.tianyu.netty.command.register; |
| | | |
| | | import com.ard.tianyu.netty.command.BaseCommand; |
| | | import com.ard.tianyu.netty.command.BaseCmd; |
| | | import io.netty.buffer.ByteBuf; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class HeartbeatReplyCommand extends BaseCommand { |
| | | public class HeartbeatReplyCmd extends BaseCmd { |
| | | |
| | | private long timestamp; // 时间戳 |
| | | |
| | | public HeartbeatReplyCommand(long timestamp) { |
| | | public HeartbeatReplyCmd(long timestamp) { |
| | | setDataHeader((short) 0x6A77); // 设置帧头 |
| | | setCmdCode((byte) 0x02); // 设置指令编号 |
| | | setDataLength((short) (13)); // 数据长度 (指令编号 + 时间戳) |