is there any system event which I can use in my program to detect a network change on macOS? I would like to call a function if the network state change, without having a lookup every x seconds in my program. Currently I'm using 'scheduledTimer' to make a lookup...
Is there a better solution for that?