Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Language
English











SourceForge.net Logo



IpAddrInfo

 

class IpAddrInfo

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.

 

Public Method List

 

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).

 


 

bool InProgress()

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).

 


 

addrinfo *GetResult()

Returns resulting addrinfo if address resolving was finished and successfull, NULL otherwise.

 


 

void Clear()

Resets IpAddrInfo to initial state.

 


 

IpAddrInfo()

~IpAddrInfo()

Constructor, destructor.

 

Last edit by cxl on 04/05/2013. Do you want to contribute?. T++