1
/***************************************************************************
2
casyncdns.h - description
4
begin : Mon Jun 10 2002
5
copyright : (C) 2002-2004 by Mathias K�ster
6
email : mathen@users.berlios.de
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
22
*@author Mathias K�ster
28
#include <netinet/in.h>
31
#include <dclib/dcos.h>
32
#include <dclib/core/cstring.h>
33
#include <dclib/core/cobject.h>
34
#include <dclib/core/cthread.h>
35
#include <dclib/core/csingleton.h>
38
typedef enum eAsyncDns {
44
class DLL_EXPORT CAsyncDnsEntry : public CObject {
49
virtual ~CAsyncDnsEntry() {};
55
/** socket error code */
60
struct sockaddr_in m_sin;
67
template class DLL_EXPORT CSingleton<CAsyncDns>;
70
class DLL_EXPORT CAsyncDns : public CSingleton<CAsyncDns>, public CThread {
79
eAsyncDns GetHostByName( CString stringHost, struct sockaddr_in * sin, int * numerr = 0 );
82
virtual void Thread( CObject * pObject );
86
void UpdateEntry( CString stringHost );
88
CStringList * m_pHostCache;
90
CStringList * m_pHostList;