Re: Checking availability of host/website
Re: Checking availability of host/website
- Subject: Re: Checking availability of host/website
- From: Omar Qazi <email@hidden>
- Date: Sat, 28 Jun 2008 00:58:03 -0700
On Jun 28, 2008, at 12:36 AM, Michael Kaye wrote:
I have implemented an SCNetworkReachAbility based method to test
firstly whether a network is available, but I was wondering in your
opinion what is the best way to check that the remote host/website
is responding to requests?
It depends on what your definition of availability is. If you want to
ping the server you can wrap a ping command through NSTask. If you
want to check if it responds to connections, NSURLConnection is for
you. If you want to check if the system is connected to the internet
you would use the api for that.
You probably just want to open an NSURLConnection and see if it
doesn't accept the connection within a second or whatever.
Omar Qazi
Hello, Galaxy!
1.310.294.1593
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden