VideoTools
|
A base class for making asynchronous DNS requests under Windows. More...
#include <grequest.h>
Public Member Functions | |
virtual | ~Request () |
Virtual destructor. More... | |
bool | valid () const |
Returns true if the constructor initiated a request properly. More... | |
std::string | reason () const |
Returns the failure reason if valid() or onMessage() returned false. More... | |
bool | onMessage (WPARAM wparam, LPARAM lparam) |
To be called when the request has been completed. More... | |
Protected Types | |
enum | { magic = 968 } |
Protected Member Functions | |
Request (bool host) | |
Constructor. More... | |
Protected Attributes | |
int | m_magic |
int | m_error |
HANDLE | m_handle |
char | m_buffer [MAXGETHOSTSTRUCT] |
bool | m_host |
bool | m_done |
bool | m_numeric |
GNet::Address | m_address |
A base class for making asynchronous DNS requests under Windows.
Definition at line 40 of file grequest.h.
|
explicitprotected |
Constructor.
Derived class constructors should issue the appropriate WSAAsync..() request, with m_buffer[] given as the result buffer.
|
virtual |
Virtual destructor.
Cancels any outstanding request.
bool GNet::Request::onMessage | ( | WPARAM | wparam, |
LPARAM | lparam | ||
) |
To be called when the request has been completed.
Returns false on error.
std::string GNet::Request::reason | ( | ) | const |
Returns the failure reason if valid() or onMessage() returned false.
bool GNet::Request::valid | ( | ) | const |
Returns true if the constructor initiated a request properly.