use of com.ctrip.xpipe.netty.NettySimpleMessageHandler in project x-pipe by ctripcorp.
the class PsyncLatencyTest method startSendMessage.
private void startSendMessage() {
EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
Bootstrap b = new Bootstrap();
b.group(eventLoopGroup).channel(NioSocketChannel.class).option(ChannelOption.TCP_NODELAY, true).handler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
p.addLast(new LoggingHandler(LogLevel.DEBUG));
p.addLast(new NettySimpleMessageHandler());
p.addLast(new SetMessageHandler(PsyncLatencyTest.this));
}
});
b.connect(master);
}
Aggregations