How to notify DNS address change with code in c++?
I want to monitor the DN开发者_如何学GoS address change,can I set up an event handler or callback function in my code that is triggered when the DNS address change. thanks
You would need to periodically poll your DNS server, then do something when the address changed.
I'm not sure about DNS specifically, but if you're looking for a way to programatically monitor your own host for network events, the netlink socket API may be of use. A better option may be to utilize the netplug daemon. Both options assume a unix environment.
精彩评论