com.envisioniot.sub.client.internal.netty.ClientDecoder Maven / Gradle / Ivy
package com.envisioniot.sub.client.internal.netty;
import com.envisioniot.sub.common.generated.Common;
import com.envisioniot.sub.common.netty.PackageAnalyser;
import com.envisioniot.sub.common.netty.TransferVer;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.apache.log4j.Logger;
import java.util.List;
/**
* created by jie.jin on 2018/12/24.
*/
public class ClientDecoder extends ByteToMessageDecoder {
// TODO maxFrameLength + safe skip + fail-fast option (just like LengthFieldBasedFrameDecoder)
private static final Logger LOG = Logger.getLogger(ClientDecoder.class);
@Override
protected void decode(final ChannelHandlerContext ctx, ByteBuf in, List