vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

Why the NetClientOptions can't set the SO_TIMEOUT options

Open zhwq1216 opened this issue 7 years ago • 2 comments

I do not found any method to set the SO_TIMEOUT option io.vertx.core.net.NetClientOptions. I check the Transport.java file, only found the bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, options.getConnectTimeout()), but not found any method call like bootstrap.option(ChannelOption.SO_TIMEOUT, xxxx). Why there is no method for the NetClientOptions to set SO_TIMEOUT options?

zhwq1216 avatar Dec 11 '18 03:12 zhwq1216

I assume the reason is this option is used only when configuring old io server (blocking IO), which Vert.x doesn't use. This value tells how long a thread can be blocked waiting for read or write op.

tsegismont avatar Dec 11 '18 08:12 tsegismont

in case you need timeout, you can use the idle state timeout configuration on the options

vietj avatar Dec 11 '18 08:12 vietj