Just use one simple func to check the reachability to specified host.
- Add the NetReachability.swift file to your project.
NetReachability.reachabilityWithHostName(hostname)
https://developer.apple.com/library/ios/samplecode/Reachability/Reachability.zip