Re: SCNetworkCheckReachabilityByName
Re: SCNetworkCheckReachabilityByName
- Subject: Re: SCNetworkCheckReachabilityByName
- From: Daniel Todd Currie <email@hidden>
- Date: Thu, 29 Apr 2004 14:21:34 -0700
yep, that was the problem. passing "www.apple.com" to
SCNetworkCheckReachabilityByName() works perfectly. thanks for your
concise and well-informed reply.
On 2004 Apr 29, at 13:50, b.bum wrote:
On Apr 29, 2004, at 1:17 PM, Daniel Todd Currie wrote:
My network connection is stable, and I am certain that the URL in
versionURLString is valid, since I continue to read the data in that
URL, regardless of the results of SCNetworkCheckReachabilityByName.
I am hooked up directly to my DSL modem, so I am certain it is not a
firewall/etc. issue.
Any ideas would be greatly appreciated.
-- Daniel Currie
PS: Another question is why on earth does the reachability stuff
take over 4 seconds on my 768k DSL and 1.33 GHz G4? I don't expect
an answer for that one though...
SCNetworkCheckReachabilityByName() wants a bare hostname, not a URL.
The documentation specifically states that it wants a hostname in the
same form as what is required by gethostbyname(). In your case, this
probably means a fully qualified host name like "www.yahoo.com" or
"pyobjc.sourceforge.net".
This may also explain why it is taking so long to resolve. You are
dropping an URL into a context that only wants a bare hostname.
Depending on the configuration of your network connection or your
provider's infrastructure, the lookup may need to fail a few times
before a host-not-found response is returned to your app.
http://cocoa.mamasam.com/COCOADEV/2003/03/1/58893.php
b.bum
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.