| File was renamed from ard-work/src/main/java/com/ard/tianyu/netty/command/register/RegisterCommand.java |
| | |
| | | package com.ard.tianyu.netty.command.register;// RegisterMessage.java |
| | | |
| | | import com.ard.tianyu.netty.command.BaseCommand; |
| | | import com.ard.tianyu.netty.command.BaseCmd; |
| | | import io.netty.buffer.ByteBuf; |
| | | |
| | | /** |
| | |
| | | * @author 刘苏义 |
| | | * @date 2024/10/22 16:36 |
| | | */ |
| | | public class RegisterCommand extends BaseCommand { |
| | | public class RegisterCmd extends BaseCmd { |
| | | private int userId; |
| | | private byte[] accessToken; |
| | | |
| | | public RegisterCommand(int userId, byte[] accessToken) { |
| | | public RegisterCmd(int userId, byte[] accessToken) { |
| | | setDataHeader((short) 0x7479); // 设置帧头 |
| | | setDataLength((short) (5 + accessToken.length)); // 数据长度 |
| | | setCmdCode((byte) 0x01); // 设置命令编号 |