title: Handling IP address changes while socket is bound to interface
body: <p>Using Python on Linux: I have a TCPSocket server that I would like to listen on eth0, and no other interfaces. If eth0 has no address, the socket should not listen at all.</p>
  
  <p>I can bind to the IP address associated with eth0, but if that address changes, my socket will no longer receive connections. There appears to be no simple way to receive notifications of IP address changes.</p>
  
  <p>I could poll the IP address of eth0, and bind the socket to the new address when it changes. Is there a better way of implementing this?</p>
  
  <p>I explored SO_BINDTODEVICE but this requires root privileges.</p>