use of org.jboss.netty.handler.codec.compression.ZlibDecoder in project Terasology by MovingBlocks.
the class InfoRequestPipelineFactory method getPipeline.
@Override
public ChannelPipeline getPipeline() throws Exception {
JoinStatusImpl joinStatus = new JoinStatusImpl();
ChannelPipeline p = Channels.pipeline();
p.addLast(MetricRecordingHandler.NAME, new MetricRecordingHandler());
p.addLast("lengthFrameDecoder", new LengthFieldBasedFrameDecoder(8388608, 0, 3, 0, 3));
p.addLast("inflateDecoder", new ZlibDecoder());
p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
p.addLast("protobufDecoder", new ProtobufDecoder(NetData.NetMessage.getDefaultInstance()));
p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
p.addLast("protobufEncoder", new ProtobufEncoder());
p.addLast("authenticationHandler", new ClientHandshakeHandler(joinStatus));
p.addLast("connectionHandler", new ServerInfoRequestHandler());
return p;
}
use of org.jboss.netty.handler.codec.compression.ZlibDecoder in project Terasology by MovingBlocks.
the class TerasologyClientPipelineFactory method getPipeline.
@Override
public ChannelPipeline getPipeline() throws Exception {
JoinStatusImpl joinStatus = new JoinStatusImpl();
ChannelPipeline p = pipeline();
p.addLast(MetricRecordingHandler.NAME, new MetricRecordingHandler());
p.addLast("lengthFrameDecoder", new LengthFieldBasedFrameDecoder(8388608, 0, 3, 0, 3));
p.addLast("inflateDecoder", new ZlibDecoder());
p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
p.addLast("protobufDecoder", new ProtobufDecoder(NetData.NetMessage.getDefaultInstance()));
p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
p.addLast("protobufEncoder", new ProtobufEncoder());
p.addLast("authenticationHandler", new ClientHandshakeHandler(joinStatus));
p.addLast("connectionHandler", new ClientConnectionHandler(joinStatus, networkSystem));
p.addLast("handler", new ClientHandler(networkSystem));
return p;
}
Aggregations