use of io.nuls.network.netty.conn.handler.HeartbeatServerHandler in project nuls by nuls-io.
the class NulsChannelInitializer method initChannel.
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline p = socketChannel.pipeline();
p.addLast("idle", new IdleStateHandler(READ_IDEL_TIME_OUT, WRITE_IDEL_TIME_OUT, ALL_IDEL_TIME_OUT, TimeUnit.SECONDS));
// p.addLast("decoder", new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, MAX_FRAME_LENGTH, 4, 4, 6, 0, true));
// p.addLast("encoder0", new LengthFieldPrepender(8, false));
p.addLast("decoder", new NulsMessageDecoder());
p.addLast("encoder0", new NulsMessageEncoder());
p.addLast("heartbeat", new HeartbeatServerHandler());
p.addLast(t);
}
Aggregations