Unregister Reachability event

Hi,

I'm using the reachability framework in order to register network status event for a specific address (address_st in the code below)... I'd like to support change of address which will trigger unregister from the old address and register to the new one. How can it be done ?

SCNetworkReachabilityRef reachabilityRef =
    SCNetworkReachabilityCreateWithAddress(NULL, reinterpret_cast<sockaddr *>(&address_st));

SCNetworkReachabilityContext context = {0, NULL, NULL, NULL, NULL};

SCNetworkReachabilitySetCallback(reachabilityRef, ReachabilityCallback, &context)) 

SCNetworkReachabilitySetDispatchQueue(reachabilityRef,
                                      dispatch_queue_create("com.reachability.test", nil));

thanks,

Accepted Answer

The docs seem pretty clear here:

The libdispatch queue on which the target should run. Pass NULL to disable notifications and release the queue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unregister Reachability event
 
 
Q