On Mar 25, 2010, at 21:25, Keith Willis wrote:

> For the moment I am temporarily setting my HttpCli Timeout mod to 0, which
> works well. For some reason calling "GetAsync" directly, hangs the app and I
> haven't had a chance to investigate further.

As Francois commented, the HTTP protocol is stateless but works on a 
Request/Response cycle, that is for each request you send, the server must 
return a response.  The response must include at least the status code and an 
HTTP header.  The component is acting correctly by hanging in there waiting for 

There are at least three ways to solve this.  The first and most preferred way 
is to fix the server to return a valid HTTP response, even if the data payload 
is empty.

Second, you could set a timeout to abort the connection, but any time you wait 
for it to trigger is actually wasted if in fact you are expecting *nothing* 
every time.

Thirdly, you could modify THttpCli to not wait for a response, by calling 
Abort() or something like that as soon as the request is sent.

However, it seems to me that you are expecting the server to respond some 
times, and that it is only occasionally that it does not respond.  If this is 
the case, then there is really absolutely *no way* for the THttpCli component 
to know when it is OK to wait or abort (how could it?)--this is precisely the 
reason why the HTTP protocol defines Response Status Codes and requires them.


        DZ-Jay [TeamICS]

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