33 class ServiceRequest ;
43 enum { magic = 968 } ;
47 char m_buffer[MAXGETHOSTSTRUCT] ;
69 std::string
reason()
const ;
74 bool onMessage( WPARAM wparam , LPARAM lparam ) ;
81 void operator=(
const Request & ) ;
82 static const char *
reason(
bool host ,
int error ) ;
91 HostRequest( std::string host_name , HWND hwnd ,
unsigned msg ) ;
97 std::string
fqdn()
const ;
102 bool numeric( std::string s ,
Address & address ) ;
114 HWND hwnd ,
unsigned msg ) ;
121 static const char * protocol(
bool udp ) ;
122 bool numeric( std::string s ,
Address & address ) ;
Request(bool host)
Constructor.
The GNet::Address class encapsulates a TCP/UDP transport address.
std::string reason() const
Returns the failure reason if valid() or onMessage() returned false.
A derivation of GNet::Request used for hostname lookup requests.
virtual ~Request()
Virtual destructor.
Address result() const
Returns the resolved address with a zero port number.
Address result() const
Returns the address with a zeroed host part.
bool valid() const
Returns true if the constructor initiated a request properly.
std::string fqdn() const
Returns the fully-qualified canonical hostname, if available.
bool onMessage(WPARAM wparam, LPARAM lparam)
To be called when the request has been completed.
A derivation of GNet::Request used for service (port) lookup requests.
ServiceRequest(std::string service_name, bool udp, HWND hwnd, unsigned msg)
Constructor.
HostRequest(std::string host_name, HWND hwnd, unsigned msg)
Constructor.
A base class for making asynchronous DNS requests under Windows.