Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detected if a machine is connected/Available?

How can I detect if a machine is connected/available in the present network.

It has several uses of course, but my main concern here is that my application uses resources located in specific machines and if they are not available it will not even attempt the connection and will use local resources.

like image 683
Jlouro Avatar asked Mar 18 '11 14:03

Jlouro


2 Answers

you can try making a ping to the machine. check this article Making a PING with Delphi and the WMI.

like image 54
RRUZ Avatar answered Oct 03 '22 21:10

RRUZ


ICMP echo request (PING) will tell you if the machine is up and reachable on the network. It will not tell you if the service you want to connect to is available on the machine (up and running).

Best bet would probably be to just attempt the connection and fall back to local resources if the connection fails.

like image 44
Dave Rager Avatar answered Oct 03 '22 21:10

Dave Rager