title: Does INADDR_ANY care about new interface?
body: <p>From reading from other posts</p>
  
  <p><a href="https://stackoverflow.com/questions/16508685/understanding-inaddr-any-for-socket-programming-c">understanding INADDR_ANY for socket programming - c</a></p>
  
  <blockquote>
    <p>INADDR_ANY is used when you don't need to bind a socket to a specific
    IP. When you use this value as the address when calling bind(), the
    socket accepts connections to all the IPs of the machine</p>
  </blockquote>
  
  <p><a href="http://trac.pjsip.org/repos/wiki/IPAddressChange" rel="nofollow noreferrer">http://trac.pjsip.org/repos/wiki/IPAddressChange</a></p>
  
  <blockquote>
    <p>by default we bind transports to INADDRANY/0.0.0.0, so when sending
    outgoing (UDP) packets, we rely on the OS to select the correct
    interface for us, based on what interfaces are currently online and
    the OS's internal routing table. In other words, we just call sendto()
    and let the OS "do the right thing". In case of IP address change, we
    are also relying on the OS to switch the interface from one interface
    to the new one for our UDP transmissions</p>
  </blockquote>
  
  <p>Supposed that previously I have 2 interface A, B when binding my socket using <code>IADDR_ANY</code>. After that I have interface C available (This is the case on mobile device, when user turns on 3G, Wifi)</p>
  
  <ol>
  <li><p>Will this socket accept connections from C</p></li>
  <li><p>If I turn off A, B, will this socket use C to send packets ?</p></li>
  </ol>
  
  <p><strong>P/S</strong>: Answers targeting iOS and Android (both SDK and NDK socket) are more appreciated</p>