jetty-reactive-httpclient
jetty-reactive-httpclient copied to clipboard
Support for read/write timeout.
Is it possible to set read and write connection timeout using HttpClient? From what I can see, HttpClient does not provide support for set read and write connection timeout.
what you want is idle timeout
@hubertlapsa you have to clarify what you exactly mean by read and write timeout.
HttpClient
supports a variety of timeouts, and chances are that they are already implemented for what you want to do.
But it's not clear what you want to do.
In the original context, we need an ability to distinguish the connect timeout (which might need a bigger value) from the read/write timeout (when it is expected to be quite low). idleTimeout
sounds interesting, but I wonder, if it would work to set high connectTimeout
(e.g. 20 seconds) and low idleTimeout
(e.g. 2 seconds) - in other word, if idleTimeout
won't kick in while waiting for some bytes in connect?
if it would work to set high connectTimeout (e.g. 20 seconds) and low idleTimeout (e.g. 2 seconds)
Yes it would work.
The idleTimeout
covers network idleness (both read and write).
Closing as answered.