com.github.netty.protocol.mysql.AbstractPacketDecoder Maven / Gradle / Ivy
The newest version!
package com.github.netty.protocol.mysql;
import com.github.netty.protocol.mysql.server.ServerEofPacket;
import com.github.netty.protocol.mysql.server.ServerErrorPacket;
import com.github.netty.protocol.mysql.server.ServerOkPacket;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.TooLongFrameException;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
/**
*
*/
public abstract class AbstractPacketDecoder extends ByteToMessageDecoder implements Constants {
private final int maxPacketSize;
public AbstractPacketDecoder(int maxPacketSize) {
this.maxPacketSize = maxPacketSize;
}
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List