ok2c commented on code in PR #712:
URL: 
https://github.com/apache/httpcomponents-client/pull/712#discussion_r2297700938


##########
httpclient5/src/main/java/org/apache/hc/client5/http/config/ConnectionConfig.java:
##########
@@ -149,7 +149,15 @@ public Builder setSocketTimeout(final int soTimeout, final 
TimeUnit timeUnit) {
         }
 
         /**
-         * Determines the default socket timeout value for I/O operations.
+         * Determines the default socket timeout value for I/O operations on
+         * connections created by this configuration.
+         * A timeout value of zero is interpreted as an infinite timeout.
+         * <p>
+         * This value acts as a baseline configured by the I/O layer. It can be

Review Comment:
   @LichKing-lee Actually this is not quite correct. The baseline is 
established by the respective i/o layer (`SocketConfig` for the classic one and 
`IOReactorConfig` for the async one). Those settings apply to all newly created 
connections / channels. `ConnectionConfig` is one layer up and can apply 
selectively to specific hosts. This is reason `ConnectionConfig` exists, so one 
could configure different connection settings for specific hosts only.



##########
httpclient5/src/main/java/org/apache/hc/client5/http/config/RequestConfig.java:
##########
@@ -549,6 +549,13 @@ public Builder setConnectTimeout(final long 
connectTimeout, final TimeUnit timeU
          * configured appropriately.
          * </p>
          * <p>
+         * This parameter may override a socket timeout configured at the 
connection
+         * or I/O layers for the duration of a message execution. It is not a 
hard

Review Comment:
   @LichKing-lee Not quite. It does not apply to the entire duration of a 
message exchange. It defines the maximum period of inactivity between sending 
of a request and a receipt of a message head. Once a response has been received 
the connection socket gets reset back to its previous value. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to