解码器拆分

This commit is contained in:
Guoqs
2024-11-27 14:32:51 +08:00
parent 9b95a07d8b
commit cd252d5ed1
8 changed files with 143 additions and 12 deletions

View File

@@ -37,10 +37,10 @@ public class YKCBusinessServiceImpl implements YKCBusinessService {
@Override
public byte[] process(byte[] msg, ChannelHandlerContext ctx) {
if (!YKCUtils.checkMsg(msg)) {
// 校验不通过,丢弃消息
return null;
}
// if (!YKCUtils.checkMsg(msg)) {
// // 校验不通过,丢弃消息
// return null;
// }
YKCDataProtocol ykcDataProtocol = new YKCDataProtocol(msg);
// 获取帧类型
String frameType = YKCUtils.frameType2Str(ykcDataProtocol.getFrameType());