hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan P. Gardner" <Gardner_Natha...@cat.com>
Subject Re: When exactly does a socket timeout get triggered?
Date Mon, 18 Jun 2007 15:16:44 GMT
Roland, yes, thanks for the info.


Thanks,
Nate Gardner




Roland Weber <ossfwot@dubioso.net> 
06/16/2007 05:50 AM
Please respond to
"HttpClient User Discussion" <httpclient-user@jakarta.apache.org>



To
HttpClient User Discussion <httpclient-user@jakarta.apache.org>
cc



Subject
Re: When exactly does a socket timeout get triggered?




Caterpillar: Confidential Green Retain Until: 07/16/2007        Retention 
Category:  G90 - General Matters/Administration


Hello Nathan,

> When exactly does a socket timeout get triggered?
> 
> Is it when the SO_TIMEOUT time has been reached and the first byte of 
data 
> has not been received?

Yes. Socket timeouts are per read operation. If you receive a
response, even with only a single byte of data, before the
timeout hits, then the read operation succeeds. If you want
to read more data, you have to call another read operation,
which will start a new timeout interval. This is not specific
to HTTP, it's general socket behavior:
http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int)


hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message