Could nmos-cpp handle updates to IP addresses automatically?
garethsb opened this issue · comments
IP addresses can change dynamically on interfaces, e.g. due to DHCP renewal.
If an NMOS service is running when this happens, a number of things are required:
- The change needs to be detected
http_listener
orwebsocket_listener
servers may need to be closed and reopened- Resource attributes may need to be updated (e.g.
href
andaddress
) and the resources re-registered - Thread function state may need to be updated (e.g. where currently copied out of
settings
into local variables)
A current workaround for the actions 2-4 is to tear down the nmos::server
and relaunch with new settings
.
Probably platform-specific code is required simply to get a notification about IP address changes: