Re: Efficient method of checking connectivity
Re: Efficient method of checking connectivity
- Subject: Re: Efficient method of checking connectivity
- From: Allan Nathanson <email@hidden>
- Date: Tue, 1 Jun 2004 20:22:43 -0400
You also need to call SCNetworkReachabilityScheduleWithRunLoop()
- Allan
On Jun 1, 2004, at 4:40 PM, Ricky Sharp wrote:
On Jun 1, 2004, at 11:36 AM, Ricky Sharp wrote:
I'll test this when I get home (where I have dialup access). At my
day job, we're always on a LAN.
Still no luck (now at home with the dialup)
The code I'm now using:
CInternet::CInternet (void) :
CTechnology (CTechnology::kInternet)
{
sReachabilityRef = SCNetworkReachabilityCreateWithName (
kCFAllocatorDefault, "www.instantinteractive.com");
FailNILVar (sReachabilityRef);
Boolean callbackSet = SCNetworkReachabilitySetCallback (
sReachabilityRef, CInternet::ReachabilityCallBack, NULL);
FailIfFalse (callbackSet);
}
CInternet::~CInternet (void)
{
Shutdown();
(void) SCNetworkReachabilitySetCallback (sReachabilityRef, NULL,
NULL);
::CFRelease (sReachabilityRef);
sReachabilityRef = NULL;
}
void CInternet::ReachabilityCallBack (SCNetworkReachabilityRef
inTarget,
SCNetworkConnectionFlags inFlags, void* ioInfo)
{
int x = 0;
}
While the reachability reference is valid and the callback is set, my
callback is never called (even when I disconnected from the modem and
reconnected)
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.