This class encapsulates getaddrinfo API, also providing optional non-blocking behaviour (using auxiliary threads). Note that there is currently no synchronization available for this non-blocking behaviour (it is not possible to e.g. select on IpAddrInfo). Also note that IpAddrInfo has some maximum number (currently 32) of slots used to resolve hosts similtaneously, however when this number is exceeded, it only means that InProgress tries to put the request to the slot (and returns true if non available or if request is not resolved yet), so from the client view, this limit has little impact.
void Start(const String& host, int port, int family = FAMILY_ANY)
Starts resolving address of host (with port). family can be used to narrow the scan to particular IP protocol (FAMILY_IPV4, FAMILY_IPV6).
Returns true if resolving of address is still in progress.
bool Execute(const String& host, int port, int family = FAMILY_ANY)
Resolves address host (with port). This is blocking variant, returns after address is resolved. Returns true if address was found. family can be used to narrow the scan to particular IP protocol (FAMILY_IPV4, FAMILY_IPV6).
Returns resulting addrinfo if address resolving was finished and successfull, NULL otherwise.
Resets IpAddrInfo to initial state.