I did implement a kind of time-out mechanism into my download thing: if
no event is triggered for a given amount (no state change, no data
received, no error) I consider the connection to be timed out. This
gets my application back on the track working properly but this feels
like a hack, it doesn't seem to be the right thing to do. Please correct
me if I'm wrong!
You should always implement timeout. Altough in your particular case, there
may be a problem somewhere else. I suggest you use a sniffer to see why the
connection doesn't establish with the webserver (The next state after
httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal,
link from the links page at ICS website), you'll be able to see if the
connection request packet is sent by your program and if the reply (positive
or refused) come back from server. I guess the reply doesn't come back. Once
we know that information, we'll be able to diagnose further.
btw: You may also try to use the same URL and same server with the demo
program HttpTst provided with ICS to see if it happends or not. If it
doesn't happend with HttpTst demo, then it is likely there is something
wrong with your code. If it happend with HttpTst, it is likely a problem of
the webserver, of a security product (firewall, antivirus,...) or maybe you
found a bug (Then trying with V6 beta could be useful since this version has
the latest code available).
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
- Original Message -
From: Cosmin Prund [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Friday, November 10, 2006 3:13 PM
Subject: [twsocket] Help on ICS's HTTP client component
Hello everyone.
Note:
This is a re-post of a message sent to the Talk list, with more detail
on the problem. This message gets sent the second time to this list too.
I sent the first one before receiving elist's subscription
confirmation so I don't think it went through.
I'm having some trouble using the THttpCli component from the ICS suite.
I'm using this component to simply download a document off a web site
(the document might be a configuration file or a compressed DLL file
or whatever). It mostly works but some times it just stops (gets stuck
in a state - the last OnChangeState message I'm getting is
httpDnsLookupDone) and then nothing happens. My application's GUI
doesn't get stuck because Application's message pump is working, but the
download doesn't finish ether. Or, if something does happen, I know
nothing about it... Please note I'm using GetAsync to get my document.
Extra information:
I'm using the version of ICS marked [ Download the latest ICS-V5
Distribution ] on http://www.overbyte.be/frame_index.html. Is V6 for
general consumption? Should I try that?
The web server I'm accessing is likely not the cause for this problem as
the server is an Apache server running on a Windows machine on my LAN.
I did implement a kind of time-out mechanism into my download thing: if
no event is triggered for a given amount (no state change, no data
received, no error) I consider the connection to be timed out. This
gets my application back on the track working properly but this feels
like a hack, it doesn't seem to be the right thing to do. Please correct
me if I'm wrong!
Thanks,
Cosmin Prund
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be