- socketpro.zip
- netdemo
- bin
- DNSResolver.exe
- GetHtml.exe
- IONet.exe
- MultipleSvs.exe
- MultiSvs.exe
- MultiSvsClient.exe
- NetBaseR.dll
- SafeSocket.exe
- SecureSocket.exe
- SpeedTest.exe
- ClientComponents
- ClientSocket.dll
- DResolver.dll
- SBroker.dll
- SockFile.dll
- help
- include
- lib
- NetBaseR.lib
- MultiSvsSample
- Samples
- client
- DnsSvs
- GetHTML
- InternetIO
- MultiSvsSample
- SecureSocket
- SpeedTest
- DResolver
- Svr
- SvrComponents
- MultipleSvs.exe
- MultiSvs.exe
- NetBaseR.dll
- SafeSocket.exe
- trash
|
#ifndef __HOST_DNS_RESOLVER_H___
#define __HOST_DNS_RESOLVER_H___
#include "AsySocket.h"
#define HOST_DNS_SVS_SOCKET 0xA00100DD
#define HOST_DNS_SVS_METHOD_ID_GETDNSNAME_BYNAME 1
#define HOST_DNS_SVS_METHOD_ID_GETDNSNAME_BYADDR 2
#define HOST_DNS_SVS_METHOD_ID_GET_COUNT_CLIENTS 3
#define HOST_DNS_SVS_METHOD_ID_GET_CLIENTS 4
class CHostDnsSvs : public CSockWithThread
{
public:
CHostDnsSvs();
private:
//Three lengthy actions invloved
SockMethodID m_pMethodIDs[3];
CSockThreadInfo m_pHostThreadInfo[2];
protected:
//for processing the request HOST_DNS_SVS_METHOD_ID_GET_CLIENTS
//using the main thread/message queue if not many clients are available
virtual bool GetClients();
//for processing the request HOST_DNS_SVS_METHOD_ID_GET_COUNT_CLIENTS
virtual bool GetCountClients();
//must be overwrite
virtual bool QuickProcess(SockMethodID nMethodID);
private:
//used by two threads/message queues for processing lengthy actions
static HRESULT GetHostByNameProc(SOCKET hSocket, SockMethodID nMethodID, void *pBuffer, DWORD nBufferLen, void* pSockWithThread);
static HRESULT GetHostByIPAddrProc(SOCKET hSocket, SockMethodID nMethodID, void *pBuffer, DWORD nBufferLen, void* pSockWithThread);
};
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Yuancai (Charlie) Ye, an experienced C/C++ software engineer, lives in Atlanta, Georgia. He is an expert at continuous inline request/result batching, real-time stream processing, asynchronous data transferring and parallel computation for the best communication throughput and latency. He has been working at SocketPro (https://github.com/udaparts/socketpro) for more than fifteen years.