Search in sources :

Example 1 with HandshakeDecoder

use of org.apollo.net.codec.handshake.HandshakeDecoder in project apollo by apollo-rsps.

the class ServiceChannelInitializer method initChannel.

@Override
protected void initChannel(SocketChannel ch) throws Exception {
    ChannelPipeline pipeline = ch.pipeline();
    pipeline.addLast("handshakeDecoder", new HandshakeDecoder());
    pipeline.addLast("timeout", new IdleStateHandler(NetworkConstants.IDLE_TIME, 0, 0));
    pipeline.addLast("handler", handler);
}
Also used : IdleStateHandler(io.netty.handler.timeout.IdleStateHandler) HandshakeDecoder(org.apollo.net.codec.handshake.HandshakeDecoder) ChannelPipeline(io.netty.channel.ChannelPipeline)

Aggregations

ChannelPipeline (io.netty.channel.ChannelPipeline)1 IdleStateHandler (io.netty.handler.timeout.IdleStateHandler)1 HandshakeDecoder (org.apollo.net.codec.handshake.HandshakeDecoder)1