update 汇付协议

This commit is contained in:
Guoqs
2024-08-06 14:39:09 +08:00
parent b87efcda57
commit f5d5e3c6eb
9 changed files with 71 additions and 34 deletions

View File

@@ -13,7 +13,7 @@ import java.util.List;
public class MessageDecode extends ByteToMessageDecoder {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
log.info("MessageDecode.decode");
// log.info("MessageDecode.decode");
// 检查是否有足够的字节可以读取
if (in.readableBytes() < 14) { // 最小长度包头3 + 长度2 + 物理ID4 + 消息ID2 + 命令1 + 校验2
return;

View File

@@ -17,7 +17,7 @@ public class StartAndLengthFieldFrameDecoder extends ByteToMessageDecoder {
public StartAndLengthFieldFrameDecoder() {}
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception {
log.info("StartAndLengthFieldFrameDecoder.decode");
// log.info("StartAndLengthFieldFrameDecoder.decode");
// 记录包头开始的index
int beginReader;