C4 Engine
C4 Engine API Documentation

class DomainNameResolver

Defined in:  C4Network.h
The DomainNameResolver class represents an in-progress domain name resolution.

class DomainNameResolver : public ListElement<DomainNameResolver>, public Completable<DomainNameResolver>

Member Functions
DomainNameResolver::GetResolveResult Returns the result code of a domain name resolution.
DomainNameResolver::GetAddress Returns the IP address found by a domain name resolution.
DomainNameResolver::Cancel Cancels an in-progress domain name resolution.


The constructor has private access. All instances of DomainNameResolver are created by the Network Manager.
A DomainNameResolver object represents a pending request for a domain name resolution. A domain name resolution is initiated by calling the NetworkMgr::ResolveAddress function, which returns a pointer to a newly created DomainNameResolver object. When the domain name is resolved, the completion callback is called and is passed an instance of the DomainNameResolver class. A subsequent call to the DomainNameResolver::GetAddress function retrieves the IP address corresponding to the domain name.
Base Classes
ListElement<DomainNameResolver> Used internally by the Network Manager.
Completable<DomainNameResolver> The completion callback is invoked when the domain name has been resolved.
See Also