com.github.liuyehcf.framework.rpc.maple.netty.MaplePacketHandler Maven / Gradle / Ivy
package com.github.liuyehcf.framework.rpc.maple.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageCodec;
import java.util.List;
/**
* @author hechenfeng
* @date 2019/3/24
*/
public class MaplePacketHandler extends ByteToMessageCodec {
@Override
protected void encode(ChannelHandlerContext ctx, MaplePacket msg, ByteBuf out) {
out.writeBytes(msg.serialize());
}
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy