Asynchronous Resolving

The standard UNIX resolver is synchronous, which means it blocks the calling program until the name has been resolved. You make the call, the library issues the DNS query, and any other queries to configured name services such as NIS wait for the reply and then return to your program. This can lead to your application being blocked for several seconds. Depending on the application, this might or might not be acceptable. Under UNIX, though, it's not too hard to find a way around this restriction and implement non-blocking DNS. Some applications, such as Netscape, fork a separate process to perform resolving and use simple IPC mechanisms to communicate with it. Under various flavors of UNIX, the ways to accomplish this ...

Get Concise Guide to DNS and BIND, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.