Hello,

 

> Where did you find that example?  Was that some I wrote 10 years ago? 

 

>The ICS demo is OverbyteIcsPingTst1, and the ICS V8 version of ping now

>includes TPingThread. 

 

I got it from the samples on ICS website, I think. The project is named
PingThrd.

It uses TPingThread. (TPingThread = class(TThread))

 

The list update line in TPing is:

Nov 08, 2010 V6.01 Arno improved final exception handling, more details

             in OverbyteIcsWndControl.pas (V1.14 comments).  

 

 

> The timeout is simply the maximum period the thread will wait for an ICMP
response before exiting. 

 

Umm. That does not seem right. Setting timeout calls:

 

procedure TPing.SetTimeout(Value : Integer);

begin

    if Assigned(FIcmp) then

        FIcmp.Timeout := Value;

end;

 

Does not seem thread related. I could be wrong.

 

Thanks for the response.

 

Mark

 

 

 

From: zayin [mailto:za...@pdq.net] 
Sent: Tuesday, September 03, 2013 8:22 AM
To: 'twsoc...@elists.org' (twsoc...@elists.org)
Subject: TPing, PingThrd1...

 

Hello,

 

Using the PingThrd1 example I set the timeout and it does not make any
difference when the no response error message arrives.

 

Received 0 bytes from 10.0.0.9 in 2892 ms

 

I read this on a help page:

 


Timout:

Time to wait for response (in milliseconds). Default is 4000, or 4 seconds.

 

Then why was it 2892 milliseconds? I am confused. ;)

 

Then I read this:

 

Time in miliseconds which may elapse between sending and receiving the ICMP
packet.

 

So, really the timeout is the maximum time to wait and the response could
come much sooner?

Does the timeout to the DNSLookup? 

 

procedure TPingThread.Execute;

var

   Msg: TagMsg;

begin

   FPing := TPing.Create(nil);      // create in thread context

   FPing.OnDnsLookupDone := FPingDnsLookupDone;

   FPing.DnsLookup(Addr);

   FPing.Timeout:=5000;                           <-------------ADDED

 

What am I doing wrong? Or am I not understanding the timeout purpose?

 

Thanks,

 

Mark

 

 

-- 
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