# How to Test if a Host Is Active

Sometimes, we would like to check if a remote host is reachable before we establish a connection. This is much like the function of the ping command in terminal. Well in Cocoa programing, you can use the function SCNetworkReachabilityCreateWithName().