io.github.shanqiang.network.client.RequestEncoder Maven / Gradle / Ivy
The newest version!
package io.github.shanqiang.network.client;
import io.github.shanqiang.exception.UnknownCommandException;
import io.github.shanqiang.table.Table;
import io.github.shanqiang.network.Command;
import io.github.shanqiang.network.LZ4;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.StandardCharsets;
import java.util.List;
public class RequestEncoder extends MessageToByteEncoder> {
private static final Logger logger = LoggerFactory.getLogger(RequestEncoder.class);
public static final int LENGTH_FIELD_LENGTH = 4;
private static final byte[] LENGTH_PLACEHOLDER = new byte[LENGTH_FIELD_LENGTH];
@Override
protected void encode(ChannelHandlerContext channelHandlerContext, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy