title: non-blocking network address resolution (gethostbyname or getaddrinfo)?
body: <p>Using a classic nsswitch.conf configuration :</p>
  
  <pre><code>hosts:      files dns
  </code></pre>
  
  <p>Trying to resolve a name using <strong>gethostbyname</strong> (or <strong>getaddrinfo</strong>) could take a while if the DNS does not answer (or is badly configured).</p>
  
  <p>Is there a way to configure a timeout in nsswitch.conf or use an alternative api that manage a timeout ?</p>