12 #include "wvlinklist.h"
13 #include "wvhashtable.h"
26 static int numresolvers;
27 static WvResolverHostDict *hostmap;
28 static WvResolverAddrDict *addrmap;
39 int findaddr(
int msec_timeout, WvStringParm name,
40 WvIPAddr const **addr, WvIPAddrList *addrlist = NULL);
41 int findname(
int msec_timeout,
WvIPAddr *ipaddr,
char **name);
43 void clearhost(WvStringParm
hostname);
52 #endif // __WVRESOLVER_H
void pre_select(WvStringParm hostname, WvStream::SelectInfo &si)
add all of our waiting fds to an fd_set for use with select().
ASynchronous DNS resolver functions, so that we can do non-blocking lookups.
bool post_select(WvStringParm hostname, WvStream::SelectInfo &si)
determines whether the resolving process is complete.
WvString is an implementation of a simple and efficient printable-string class.
the data structure used by pre_select()/post_select() and internally by select().
int findaddr(int msec_timeout, WvStringParm name, WvIPAddr const **addr, WvIPAddrList *addrlist=NULL)
Return -1 on timeout, or the number of addresses found, which may be 0 if the address does not exist.
An IP address is made up of a "dotted quad" – four decimal numbers in the form www....
WvString hostname()
Do gethostname() without a fixed-length buffer.