Re: Strange problem with TIdIcmpClient

Giganews Newsgroups
Subject: Re: Strange problem with TIdIcmpClient
Posted by:  Remy Lebeau (TeamB) (
Date: Fri, 3 Mar 2006

"Simon A." <saberu…> wrote in message

> Now, the strange thing. If I start the 4 application one after the other
> (the four in a row), the two applications pingning the same IP address
> starts to get rsEcho (ping ok) answer from the OnReply , even if the
> server are down!

A ping will only tell you if a remote machine is reachable.  A ping will not
tell you if there is a server application active on that machine to connect

> They always get answer from the ping until I close the other two
> application pingning two diffrent IP addresses. When those two
> application are closed, OnReply starts to give good result again, in
> occurence, rsTimeOut.

A ping requires the use of a RAW socket.  The thing to keep in mind about a
RAW socket is that it intercepts network data throughout the entire
machine - even for other threads and processes!  So you probably have one
TIdIcmpClient instance receiving the replies that are actually meant for
other TIdIcmpClient instances.

> Is there a possibility of crosstalk between the application through the
> Windows internals TCP stack?


My suggestion would be to forget the pinging altogether and just connect
always, and catch any failures that the connects may report.



In response to

Strange problem with TIdIcmpClient posted by Simon A. on Fri, 3 Mar 2006