mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -25,10 +25,7 @@ public class StartAndLengthFieldFrameDecoder extends ByteToMessageDecoder {
|
||||
public final int BASE_LENGTH = 1 + 1;
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer,
|
||||
List<Object> out) throws Exception {
|
||||
// System.out.println();
|
||||
// log.info("打印ByteBuf:{}", buffer.toString());
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception {
|
||||
// 可读长度必须大于基本长度
|
||||
if (buffer.readableBytes() <= BASE_LENGTH) {
|
||||
log.warn("可读字节数:{}小于基础长度:{}", buffer.readableBytes(), BASE_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user