Theocacao
Leopard
Design Element
Comment on "Checking Network Status with CFNetDiagnostics"
by John Pannell — Dec 18
I found this snippet on the mailing lists some time ago...

BOOL networkReachableWithoutAnythingSpecialHappening(void)
{
Boolean Success;
SCNetworkConnectionFlags ReachabilityStatus;
Success = SCNetworkCheckReachabilityByName("www.positivespinmedia.com",
&ReachabilityStatus);
return (Success && (ReachabilityStatus & 3));
}

You must include the SystemConfiguration framework in the project - same steps that Scott described. Panther and Tiger compatible.
Back to "Checking Network Status with CFNetDiagnostics"
Design Element

Copyright © Scott Stevenson 2004-2015