Hi,

I don't really have a controlling thread.  It's a bit kludgy at the moment,
in that each thread gets told the item index of the computer in the listview
(and its IP address, etc), and updates the listview itself in a synchronize
call.  

I've been playing about a bit, and you were right, some of the ping
responses were coming back from the wrong address.  Then I found what
SequenceID was for, and using that seemed to sort out the issues of machines
that aren't turned on returning pings.   

So, now I don't have issues with machines that aren't turned on responding
to pings, but I still have issues with machines that are on not responding.
Wonder if that could just be a network issue, as sometimes machines reply as
they should, and sometimes they don't.

Thanks for the suggestions anyway.

Neil.

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of mainiacfreakus
> Sent: 16 February 2006 12:00
> To: [email protected]
> Subject: Re: [delphi-en] TIdICMPClient and threading
> 
> Hi Neil
> 
> It depends how you use the threads ...
> 
> You would need to have a controlling thread of some sort that 
> would collate
> the ping results from the ICMP threads and return the list of 
> results to
> your app.
> You should also check that the threads are being assigned 
> different IPs to
> ping. i.e. if two threads are trying to ping the same pc at 
> the same time,
> one will return true and the other false; and since the false 
> thread will
> have ping timeout it will return last and cause the computer 
> to appear to be
> off.
> For the ones that return true, it might be that IP address 
> that it returned
> is not the ip that it actually pinged?? not sure about this though?
> 
> Mainiacfreakus
> 
> On 2/16/06, Neil Bullock <[EMAIL PROTECTED]> wrote:
> >
> >  Hi,
> >
> > I'm having some issues with TIdICMPClient inside a thread.  
> I have a list
> > of
> > computers in a listview, and am creating 5-10 threads to 
> ping each of
> > these
> > and decide whether it's turned on or not.  I'm getting unpredictible
> > results
> > - some machines that aren't on are supposedly responding to 
> pings, and
> > some
> > machines that are on are not.  Is this due to the 
> threading?  I've dropped
> > the maximum number of ping threads my program creates to 1, 
> and (apart
> > from
> > being far too slow to use), it seems to fix the problem.
> >
> > Can I not use TIdICMPClient in multiple threads?
> >
> > Thanks,
> > Neil.
> >
> >
> >
> >
> >  -----------------------------------------------------
> > Home page: http://groups.yahoo.com/group/delphi-en/
> > To unsubscribe: [EMAIL PROTECTED]
> >
> >
> >  ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> >    -  Visit your group 
> "delphi-en<http://groups.yahoo.com/group/delphi-en>"
> >    on the web.
> >
> >    -  To unsubscribe from this group, send an email to:
> >     
> [EMAIL PROTECTED]<[EMAIL PROTECTED]
> hoogroups.com?subject=Unsubscribe>
> >
> >    -  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >    Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> >  ------------------------------
> >
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED] 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 




-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to