Getting notified when a VPN connection disconnects
How can I, within my Cocoa app, get a notification when the currently running VPN开发者_运维知识库 connection disconnects? I'm running Snow Leopard.
You may be able to use the System Configuration framework for this. You can examine the System Configuration hierarchy with scutil(8), and you might have a look at HardwareGrowler's source code for examples of how to use the framework.
Also, documentation:
- http://developer.apple.com/mac/library/documentation/Networking/Conceptual/SystemConfigFrameworks/
- http://developer.apple.com/mac/library/documentation/Networking/Reference/SysConfig/
精彩评论