Link to home
Start Free TrialLog in
Avatar of allie910
allie910

asked on

idHttp error when the connection idle for some time (EIdSocketError, connection abort)

hi all,

i'm using idHtpp to get the HTML page from an online website and get the price value listed in the website. well, here is my code to get the file

             idHttp1.Request.ProxyServer := ProxyName ;
             idHttp1.Request.ProxyPort := 8080;
             HTMLContent := IdHTTP1.Get(IEAddress);

my problem is... it seems that if the connection has been idle for some time, it will give me an error :

exception class error EIdSocketError with message 'Socket error #10053
software caused connection abort.

how can I solve this problem.... so that it wont give me the error, although if the connection has been idle ?

well, Thanks alot =)
ASKER CERTIFIED SOLUTION
Avatar of auke_t
auke_t
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allie910
allie910

ASKER

hi auke_t....

i tried your suggestion... but it give error :
undeclared identifier on -- > result := IdHTTP1.Get(IEAddress);

I think U can't set any property in the function... any suggestion ? =)

thanks ;)
Hi Allie,

You can only use the IdHTTP1 reference if you put the classname of the form before the function. (In my example TForm1). And you have to put the function in the declarations as well (or press shift+ctrl+c to automate it).

Have fun
nvm,

i already put the syntax in the procedure...

but i still have the same error :'(

hi there... :)

NVM, I already found the solution, by closing the connection and disconnection the socket after I finish connecting to the web ;)

Thank you anyway
Hi All,

so sorry for the very late reply ... I got transfered to other project and my email address changed, so I didn't get the emails from expert exchange ... so sorry....