Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

WvResolver Class Reference

#include <wvresolver.h>

List of all members.

Public Methods

 WvResolver ()
 ~WvResolver ()
int findaddr (int msec_timeout, const WvString &name, WvIPAddr const **addr, WvIPAddrList *addrlist=NULL)
int findname (int msec_timeout, WvIPAddr *ipaddr, char **name)
void clearhost (const WvString &hostname)
bool pre_select (const WvString &hostname, WvStream::SelectInfo &si)
 WvResolver ()
 ~WvResolver ()
int findaddr (int msec_timeout, const WvString &name, WvIPAddr const **addr, WvIPAddrList *addrlist=NULL)
int findname (int msec_timeout, WvIPAddr *ipaddr, char **name)
void clearhost (const WvString &hostname)
bool pre_select (const WvString &hostname, WvStream::SelectInfo &si)

Static Private Attributes

int numresolvers = 0
WvResolverHostDict * hostmap = NULL
WvResolverAddrDict * addrmap = NULL
WvResolverHostDict * hostmap
WvResolverAddrDict * addrmap


Detailed Description

ASynchronous DNS resolver functions, so that we can do non-blocking lookups

Definition at line 22 of file include/wvresolver.h.


Constructor & Destructor Documentation

WvResolver::WvResolver  
 

Definition at line 104 of file wvresolver.cc.

References addrmap, hostmap, and numresolvers.

WvResolver::~WvResolver  
 

Definition at line 114 of file wvresolver.cc.

References addrmap, hostmap, and numresolvers.

WvResolver::WvResolver  
 

WvResolver::~WvResolver  
 


Member Function Documentation

void WvResolver::clearhost const WvString   hostname
 

void WvResolver::clearhost const WvString   hostname
 

Definition at line 265 of file wvresolver.cc.

int WvResolver::findaddr int    msec_timeout,
const WvString   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. addrlist, if present, has to be an initialized list.

int WvResolver::findaddr int    msec_timeout,
const WvString   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. addrlist, if present, has to be an initialized list.

Definition at line 129 of file wvresolver.cc.

References WvResolverHost::addr, WvResolverHost::addrlist, WvList< WvIPAddr >::append(), WvResolverHost::done, WvStream::getline(), WvSplitStream::getrfd(), WvSplitStream::getwfd(), hostmap, WvStream::isok(), WvResolverHost::last_tried, WvResolverHost::loop, namelookup(), WvResolverHost::negative, WvSplitStream::noread(), WvSplitStream::nowrite(), WvResolverHost::pid, WvStream::select(), and wvfork().

Referenced by WvTCPConn::check_resolver(), WvURL::resolve(), and WvTCPConn::WvTCPConn().

int WvResolver::findname int    msec_timeout,
WvIPAddr   ipaddr,
char **    name
 

int WvResolver::findname int    msec_timeout,
WvIPAddr   ipaddr,
char **    name
 

bool WvResolver::pre_select const WvString   hostname,
WvStream::SelectInfo   si
 

add all of our waiting fds to an fd_set for use with select().

bool WvResolver::pre_select const WvString   hostname,
WvStream::SelectInfo   si
 

add all of our waiting fds to an fd_set for use with select().

Definition at line 281 of file wvresolver.cc.

References WvResolverHost::loop, and WvStream::pre_select().

Referenced by WvTCPConn::pre_select().


Member Data Documentation

WvResolverAddrDict* WvResolver::addrmap [static, private]
 

Definition at line 26 of file ipstreams/wvresolver.h.

WvResolverAddrDict * WvResolver::addrmap = NULL [static, private]
 

Definition at line 65 of file wvresolver.cc.

Referenced by WvResolver(), and ~WvResolver().

WvResolverHostDict* WvResolver::hostmap [static, private]
 

Definition at line 25 of file ipstreams/wvresolver.h.

WvResolverHostDict * WvResolver::hostmap = NULL [static, private]
 

Definition at line 64 of file wvresolver.cc.

Referenced by findaddr(), WvResolver(), and ~WvResolver().

int WvResolver::numresolvers = 0 [static, private]
 

Definition at line 24 of file ipstreams/wvresolver.h.

Referenced by WvResolver(), and ~WvResolver().


The documentation for this class was generated from the following files:
Generated on Sat Aug 24 23:08:04 2002 for WvStreams by doxygen1.2.15