how to recognize if ip address(es) has changed
Unsolved
General and Desktop
-
Hey,
I wonder how I can recognize the change of the ip address(es) of my interface.
Since I guess there is no "ip address change event" I need a workaround for this. It would be sufficient to know the number of the assigned ip addresses.One thing I can imagine would be: using a timer to read all ip addresses every certain period.
But perhaps there is something different I can use. Any ideas?
Regards.
-
@LeoC
Qt only provides a QnetworkInterface class, but it doesn't provide the functionality you need.
The only thing you could do is polling, but this is probably a bad idead (performancewise).I think there is no way around then to use the native OS API.
For example using WinAPI: NotifyAddrChange function should basically do what you want.