Board index » delphi » Does TIdAntiFreeze operate during IdIcmpClinet.Ping?

Does TIdAntiFreeze operate during IdIcmpClinet.Ping?

I'm using latest of Indy 8.0.X downloaded from website.
Does it provide a timeout or allow TIdAntiFreeze to operate
during IdIcmpClinet.Ping?  My GUI is frozen while Ping is
operating...  :-(

Pls copy response to my email.  Thanks,
Gilbert

 

Re:Does TIdAntiFreeze operate during IdIcmpClinet.Ping?


"Gilbie" <g...@iname.com> wrote in news:3bcf49d0$1_1@dnews:

Quote
> I'm using latest of Indy 8.0.X downloaded from website.
> Does it provide a timeout or allow TIdAntiFreeze to operate
> during IdIcmpClinet.Ping?  My GUI is frozen while Ping is
> operating...  :-(

I dont think AntiFreeze applies to Raw Sockets which ICMP uses.

You'll need to likely thread it.

--
Chad Z. Hower (Kudzu) - http://www.pbe.com/Kudzu/
Current Location: St Petersburg, Russia
      "Programming is an art form that fights back"

Re:Does TIdAntiFreeze operate during IdIcmpClinet.Ping?


"Kudzu - Team Indy" <chad...@pbe.com> wrote:

Quote
>"Gilbie" <g...@iname.com> wrote in news:3bcf49d0$1_1@dnews:
>> I'm using latest of Indy 8.0.X downloaded from website.
>> Does it provide a timeout or allow TIdAntiFreeze to operate
>> during IdIcmpClinet.Ping?  My GUI is frozen while Ping is
>> operating...  :-(

>I dont think AntiFreeze applies to Raw Sockets which ICMP uses.

>You'll need to likely thread it.

>--
>Chad Z. Hower (Kudzu) - http://www.pbe.com/Kudzu/
>Current Location: St Petersburg, Russia
>      "Programming is an art form that fights back"

Re:Does TIdAntiFreeze operate during IdIcmpClinet.Ping?


Thanks for the clear and definite answer!

btw I started threading the app already, but encountered
EAccessViolation when IdIcmpClient on the 2nd thread tries
to run.  (It failed when I try to set property for IdIcmpClient.  Error message said "Read of FFFFFFFF", so I assume the object
was not instantiated properly and the property was not defined?)  The IdIcmpClient access on the main thread
works ok.  And when I comment out the IdIcmpClient access on
the 2nd thread, the app works OK too.  (i.e. thread gets
param and changes param properly on GUI.  Parameter passing
and use of synchronize for thread seems to be not the problem.)

Any help would be greatly appreciated.  (My sample code of
the IdIcmpClient object instantiation is at another post
titled "How about IcmpClient - Re: Is Indy thread-safe".
The EAccessViolation occured when it is executing ICMP.Host.
I suspect I didn't instantiate IdIcmpClient properly.  Please
help this newbie.)

Thanks,
Gilbert

"Kudzu - Team Indy" <chad...@pbe.com> wrote:

Quote
>"Gilbie" <g...@iname.com> wrote in news:3bcf49d0$1_1@dnews:
>> I'm using latest of Indy 8.0.X downloaded from website.
>> Does it provide a timeout or allow TIdAntiFreeze to operate
>> during IdIcmpClinet.Ping?  My GUI is frozen while Ping is
>> operating...  :-(

>I dont think AntiFreeze applies to Raw Sockets which ICMP uses.

>You'll need to likely thread it.

>--
>Chad Z. Hower (Kudzu) - http://www.pbe.com/Kudzu/
>Current Location: St Petersburg, Russia
>      "Programming is an art form that fights back"

Re:Does TIdAntiFreeze operate during IdIcmpClinet.Ping?


Me bad!  (My suspicion was right!)
I was learning by reading samples--and unfortunately all
samples I read had the Indy components on a form.
Now I realize if it is on a thread I have to explicitly
instantiate the Indy component myself.
This code is now working...
Thanks for everyone who took time to read my post.

Quote
"Gilbie" <g...@iname.com> wrote:

>Thanks for the clear and definite answer!

{snip}
>  (It failed when I try to set property for IdIcmpClient.  Error message said "Read of FFFFFFFF", so I assume the object
>was not instantiated properly and the property was not defined?)  
{snip}
>I suspect I didn't instantiate IdIcmpClient properly.  Please
>help this newbie.)

>Thanks,
>Gilbert

Other Threads