2

How do you asynchronously resolve host names to IP addresses, preferably with overlapped I/O? GetAddrInfoEx does not support overlapped I/O in Windows 7 and earlier.

I am using native C++.

Joshua
  • 1,148
  • 3
  • 17
  • 34

2 Answers2

2

For the record, this can be done natively on Windows 7, like this:

The side effect of this technique is that it's by no means a feat for a novice to easily pull.

CodeAngry
  • 12,760
  • 3
  • 50
  • 57
2

libunbound has an asynchronous resolver in it.

Alnitak
  • 334,560
  • 70
  • 407
  • 495
  • Thanks, but I'd rather not use a whole external library for a small function. – Joshua Apr 08 '12 at 16:57
  • @Joshua if you believe that DNS resolution is a "small" function then you are seriously mistaken. – Alnitak Apr 08 '12 at 19:52
  • Sorry, I'm a novice programmer, I kind of assumed it's simple because I thought it's a simple lookup call to a DNS server. Nevertheless, it'd be awesome if I could keep this native, as I also want to learn more about Windows networking. – Joshua Apr 09 '12 at 04:44