com.gateway.connector.tcp.codec.TcpProtoDecoder Maven / Gradle / Ivy
package com.gateway.connector.tcp.codec;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gateway.connector.proto.Proto;
import com.gateway.connector.utils.ProtoUtils;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
public class TcpProtoDecoder extends ByteToMessageDecoder {
private Logger logger = LoggerFactory.getLogger(this.getClass());
private boolean isGzip = false;
public TcpProtoDecoder(boolean isGzip) {
this.isGzip = isGzip;
}
@Override
protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf, List