> Connect-timeouts are not the only possible ones.
Yes, I know, but connect ones are the most general and used by everyone, 
because w/o connection there's nothing to do anyway.

> If you need different timeout values for different states it has to be
> implemented using a timer. We need to keep the message pump
> as fast as possible.
But what about convenience? And every programmer implements these timeouts 
anyway. Or he hopes on ICS and doesnt do this receiving endless connect 
waiting...

>Actually it _is called on StateChange(httpReady).
Yes, but it is called with ErrCode = 0 and StatusCode = 0. Also I have strange 
things here:

log of my program, trying to download http://test1.ru/1.php, which is my script 
with endless loop to simulate timeout:

 URL http://test1.ru/1.php : retrieving header... (attempt 1/3) // 
FHttpCli.Head called
tick... 1 // this from my timer, which does nothing but counting
tick... 2
tick... 3
tick... 4
tick... 5
Error: HEAD Failed (404, Request aborted on timeout)! // exception from Head, 
everything's OK
 URL http://test1.ru/1.php : retrieving header... (attempt 2/3) // 
FHttpCli.Head called 2nd time
Done.// HttpRequestDone with ErrCode = 0!
Done.// HttpRequestDone with ErrCode = 0!
Header received, StatusCode = 0 // Head successfully passed!

with my timer everything's OK:

 URL http://test1.ru/1.php : retrieving header... (attempt 1/3)
tick... 1
tick... 2
tick... 3
tick... 4
tick... 5
Failed, error #3
Error: HEAD Failed (404, Connection aborted on request)!
 URL http://test1.ru/1.php : retrieving header... (attempt 2/3)
tick... 1
tick... 2
tick... 3
tick... 4
tick... 5
Failed, error #3
Error: HEAD Failed (404, Connection aborted on request)!
 URL http://test1.ru/1.php : retrieving header... (attempt 3/3)
tick... 2
tick... 3
tick... 4
tick... 5
Failed, error #3
Error: HEAD Failed (404, Connection aborted on request)!
*** finish ***

*****

BTW, I have noticed that Last-Modified filed in header isn't parsed! IMHO it's 
too important field to leave parsing of it. Maybe Magenta's code could be added 
for this purpose?

-- 
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to