Hi
I am developing App proxy network system extension on 10.15.5. Reachability callaback is registered using below method but reachability_callback is never called.
I know "defaultPath" can be used to detect the network change.
I am trying to understand underlying root cause of this issue. Does reachability callback not work with CFRunLoopGetMain?
Regards,
Anand Choubey
I am developing App proxy network system extension on 10.15.5. Reachability callaback is registered using below method but reachability_callback is never called.
Code Block void registerNetworkChangeCallback() { sockaddr_in ipv4{}; ipv4.sin_family = AF_INET; ipv4.sin_len = sizeof(sockaddr_in); ipv4.sin_addr.s_addr = 0x08080808; /*dummy ip*/ SCNetworkReachabilityRef reachableTarget = SCNetworkReachabilityCreateWithAddress(NULL, (sockaddr *)&ipv4); Boolean ok = SCNetworkReachabilitySetCallback(reachableTarget, reachability_callback, NULL); ok = SCNetworkReachabilityScheduleWithRunLoop(reachableTarget, CFRunLoopGetMain(), kCFRunLoopDefaultMode ); }
I know "defaultPath" can be used to detect the network change.
I am trying to understand underlying root cause of this issue. Does reachability callback not work with CFRunLoopGetMain?
Regards,
Anand Choubey