21 #ifndef G_HEAP_CLIENT_H
22 #define G_HEAP_CLIENT_H
58 const Address & local_interface =
Address(0U) ,
bool privileged =
false ,
60 unsigned int secure_connection_timeout = 0U ) ;
64 void doDelete(
const std::string & reason ) ;
79 virtual void onDelete(
const std::string & reason ,
bool can_retry ) = 0 ;
82 virtual void onDeleteImp(
const std::string & reason ,
bool can_retry ) ;
94 void onConnectionTimeout() ;
95 void onDeletionTimeout() ;
virtual void onDelete(const std::string &reason, bool can_retry)=0
Called just before deletion.
virtual ~HeapClient()
Destructor.
A class for making an outgoing connection to a remote server, with support for socket-level protocols...
virtual void onException(std::exception &)
Final override from GNet::EventHandler.
The Address class encapsulates an IP transport address.
A class that holds a host/service name pair and optionally the results of a name-to-address lookup...
void doDelete(const std::string &reason)
Calls onDelete() and then does a delayed "delete this".
A SimpleClient class for client objects that manage their own lifetime on the heap.
virtual void onDeleteImp(const std::string &reason, bool can_retry)
An alternative to onDelete() for private implementation classes.
void doDeleteForExit()
A destructor method that may be called at program termination when the normal doDelete() mechanism ha...
static bool synchronousDnsDefault()
Returns true if DNS queries should normally be synchronous on this platform.
HeapClient(const ResolverInfo &remote_info, const Address &local_interface=Address(0U), bool privileged=false, bool sync_dns=synchronousDnsDefault(), unsigned int secure_connection_timeout=0U)
Constructor.
A timer class template in which the timeout is delivered to the specified method. ...
virtual void onConnecting()
Called just before the connection is initiated.