mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 汇付协议
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user