Asynchronous address resolution in winsock?

In asynchronous address resolution in winsock, it seems that the only two options are either to use blocking gethostbynamein a separate thread or to use WSAAsyncGetHostByName. The latter, for some reason, is designed to work with window messages instead of overlapping operations and completion ports / routines.

Is there any version gethostbynamethat works asynchronously with overlapping operations, similar to the rest of the winsock API?

+5
source share
2 answers

Unfortunately, not at present, although GetAddrInfoEx () has placeholders for all the correct actions to work asynchronously through everything "(including IOCP), so I expect the end result ... Unfortunately, the docs are currently saying that they should all be set to NULL and marked as "reserved". :(

I'm about to write (it was some time) ... Unfortunately, WSAAsyncGetHostByNameit does not even allow simultaneous name resolution, so it is pretty useless as a base for what I want; but, again, since it does not handle IPv6, which also makes it useless to me. I expect to start from scratch; perhaps using something like this as a base (beer house).

+3
source

, gethostbyname().

+1

All Articles