xuxueli / xxl-rpc

A high performance, distributed RPC framework.(分布式服务框架XXL-RPC)
http://www.xuxueli.com/xxl-rpc/
Apache License 2.0
620 stars 404 forks source link

NettyHttpClient not support options #34

Closed qixiaobo closed 4 years ago

qixiaobo commented 4 years ago
 Bootstrap bootstrap = new Bootstrap();
        bootstrap.group(group)
                .channel(NioSocketChannel.class)
                .handler(new ChannelInitializer<SocketChannel>() {
                    @Override
                    public void initChannel(SocketChannel channel) throws Exception {
                        channel.pipeline()
                                .addLast(new IdleStateHandler(0,0,10, TimeUnit.MINUTES))
                                .addLast(new HttpClientCodec())
                                .addLast(new HttpObjectAggregator(5*1024*1024))
                                .addLast(new NettyHttpClientHandler(xxlRpcInvokerFactory, serializer));
                    }
                })
                .option(ChannelOption.SO_KEEPALIVE, true);

Only keepalive used here. We also need connection timeout and so on

xuxueli commented 4 years ago

你好,如果紧急超时时间可自行定制,这部分将会排期讨论确认。