Could someone explain me the difference between these two parameters?
- org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT;
- org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT.
According to the javadocs:
CoreConnectionPNames.CONNECTION_TIMEOUT:
Determines the timeout in milliseconds until a connection is
established. A timeout value of zero is interpreted as an infinite
timeout.
CoreConnectionPNames.SO_TIMEOUT:
Defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the
timeout for waiting for data or, put differently, a maximum period
inactivity between two consecutive data packets).
So, for the first one, CoreConnectionPNames.CONNECTION_TIMEOUT, does it happen before any data is sent?
And for the second, CoreConnectionPNames.SO_TIMEOUT, does it mean that some data was already sent? Meaning that connection was successfully established.
Thanks.
Yes, it does.
On HTTP level level, no, it does not. (TCP/IP or SSL may be a different story)
Yes, it does.