facebook / facebook/wangle

ClientBootstrap and ServerBootstrap should accept socket options

Open
#85 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

One can configure socket level options (TCP_NODELAY, etc) in Netty's Bootstrap like this:
```
this.channel = new Bootstrap().group(rpcClient.group).channel(rpcClient.channelClass)
.option(ChannelOption.TCP_NODELAY, rpcClient.isTcpNoDelay())
.option(ChannelOption.SO_KEEPALIVE, rpcClient.tcpKeepAlive)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, rpcClient.connectTO)
```
At least in ServerBootstrap there is a configurable ServerSockerFactory which can be used to configure the socket. In ClientBootstrap, I could not find an easy way to do that.

We need this for the HBase-native-client, happening here: https://issues.apache.org/jira/browse/HBASE-14850

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.