See the SCNetworkReachability Reference.
The SCNetworkReachability programming
interface allows an application to
determine the status of a system's
current network configuration and the
reachability of a target host. A
remote host is considered reachable
when a data packet, sent by an
application into the network stack,
can leave the local device.
Reachability does not guarantee that
the data packet will actually be
received by the host.
Turning IIS on and off is just preventing your server from receiving web request such as ftp/http and does not stop the device from successfully sending a data packet out.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…