What does this do in netty?
bootstrap.setOption("child.connectTimeoutMillis", x);
What does this do in netty?
bootstrap.setOption("child.connectTimeoutMillis", x);
public void setOption(String key, Object value)
Sets an option with the specified key and value. If there's already an option with the same key, it is replaced with the new value. If the specified value is null, an existing option with the specified key is removed. To set the option value of a child Channel, prepend "child." to the option name (e.g. "child.keepAlive").
Parameters:
key - the option name
value - the option value
And bootstrap.setOption("child.connectTimeoutMillis", x); sets the Connect timeout of the channel(in this case child's channel) in milliseconds. If you set the value to 0, it disables the Timeout Option.
"child.connectionTimeoutMillis" won't do anything, neither for ClientBootstrap nor for ServerBootstrap.
It's a client option so it should be used only as "connectionTimeoutMillis" (without the "child." part) on ClientBootstrap instances.
What option do I need to keep all my clients persisted forever (no time out)?
Use "child.keepAlive" for ServerBootstrap and "keepAlive" for ClientBootstrap.