Try making a connection, if you don't get a reply in a timeout you've set (BSD connect function description already specifies this AFAIK), assume the computer isn't connected. The BSD functions are in Sockets unit. High level wrapper is in fcl-net packages.