WvStreams
WvResolver Class Reference

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

#include <wvresolver.h>

Public Member Functions

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.
int findname (int msec_timeout, WvIPAddr *ipaddr, char **name)
void clearhost (WvStringParm hostname)
void pre_select (WvStringParm hostname, WvStream::SelectInfo &si)
 add all of our waiting fds to an fd_set for use with select().
bool post_select (WvStringParm hostname, WvStream::SelectInfo &si)
 determines whether the resolving process is complete.
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.
int findname (int msec_timeout, WvIPAddr *ipaddr, char **name)
void clearhost (WvStringParm hostname)
void pre_select (WvStringParm hostname, WvStream::SelectInfo &si)
 add all of our waiting fds to an fd_set for use with select().
bool post_select (WvStringParm hostname, WvStream::SelectInfo &si)
 determines whether the resolving process is complete.

Detailed Description

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

Definition at line 24 of file debian/libwvstreams-dev/usr/include/wvstreams/wvresolver.h.

Constructor & Destructor Documentation

◆ WvResolver()

WvResolver::WvResolver ( )

Definition at line 124 of file wvresolver.cc.

◆ ~WvResolver()

WvResolver::~WvResolver ( )

Definition at line 134 of file wvresolver.cc.

Member Function Documentation

◆ findaddr() [1/2]

int WvResolver::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.

addrlist, if present, has to be an initialized list. addr points to an internal WvIPAddr and will be deleted automatically.

Definition at line 149 of file wvresolver.cc.

References WvStream::blocking_getline(), WvFdStream::getrfd(), WvFdStream::getwfd(), WvFdStream::isok(), WvStream::noread(), WvStream::nowrite(), WvStream::select(), and wvfork().

◆ clearhost()

void WvResolver::clearhost ( WvStringParm hostname)

Definition at line 308 of file wvresolver.cc.

◆ pre_select()

void WvResolver::pre_select ( WvStringParm hostname,
WvStream::SelectInfo & si )

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

Definition at line 316 of file wvresolver.cc.

References hostname(), and WvStream::xpre_select().

◆ post_select()

bool WvResolver::post_select ( WvStringParm hostname,
WvStream::SelectInfo & si )

determines whether the resolving process is complete.

Definition at line 331 of file wvresolver.cc.

References hostname(), and WvStream::xpost_select().

◆ findaddr() [2/2]

int WvResolver::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.

addrlist, if present, has to be an initialized list. addr points to an internal WvIPAddr and will be deleted automatically.

References hostname().


The documentation for this class was generated from the following files: