use of org.terasology.network.internal.ServerConnectionHandler in project Terasology by MovingBlocks.
the class TerasologyServerPipelineFactory method getPipeline.
@Override
public ChannelPipeline getPipeline() throws Exception {
ChannelPipeline p = pipeline();
p.addLast(MetricRecordingHandler.NAME, new MetricRecordingHandler());
p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
p.addLast("protobufDecoder", new ProtobufDecoder(NetData.NetMessage.getDefaultInstance()));
p.addLast("frameLengthEncoder", new LengthFieldPrepender(3));
p.addLast("deflateEncoder", new ZlibEncoder());
p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
p.addLast("protobufEncoder", new ProtobufEncoder());
p.addLast("authenticationHandler", new ServerHandshakeHandler());
p.addLast("connectionHandler", new ServerConnectionHandler(networkSystem));
p.addLast("handler", new ServerHandler(networkSystem));
return p;
}
Aggregations