After publishing the last episode I realized that a discussion of Asio’s resolver class is incomplete without touching on reverse lookups. So this will be a quick episode to cover what we couldn’t get to last time.
This episode upgrades the resolver from last time by queuing up several
async_resolve queries at once. This helps us explore how the Asio implementation handles parallel requests for domain and service resolution. Here’s a hint: it’s not what you’d expect from reading the API.
This episode will provide a quick introduction to the Asio library and a small amount of asynchronous programming in general. Future episodes will continue this work by introducing additional libraries and talking to actual web services. For now we’ll start by building a small app that resolves hostnames into IP addresses. The gflags and glog libraries will provide some helpful infrastructure to get things started. Take a look at Episode 002 to refresh your memory of how they work.