21 #ifndef G_HEAP_CLIENT_H
22 #define G_HEAP_CLIENT_H
58 bool bind_local_address =
false ,
61 unsigned int secure_connection_timeout = 0U ) ;
65 void doDelete(
const std::string & reason ) ;
77 virtual void onDelete(
const std::string & reason ) = 0 ;
80 virtual void onDeleteImp(
const std::string & reason ) ;
89 virtual void onException( std::exception & ) g__final override ;
97 void onConnectionTimeout() ;
98 void onDeletionTimeout() ;
virtual ~HeapClient()
Destructor.
A class for making an outgoing connection to a remote server, with support for socket-level protocols...
virtual void onDeleteImp(const std::string &reason)
An alternative to onDelete() for private implementation classes.
HeapClient(const Location &remote_info, bool bind_local_address=false, const Address &local_address=Address::defaultAddress(), bool sync_dns=synchronousDnsDefault(), unsigned int secure_connection_timeout=0U)
Constructor.
The GNet::Address class encapsulates a TCP/UDP transport address.
virtual void onException(std::exception &) g__final override
Override from GNet::EventExceptionHandler.
void doDelete(const std::string &reason)
Calls onDelete() and then does a delayed "delete this".
A class that holds a host/service name pair and the preferred address family (if any), and also the results of a name-to-address lookup, ie.
virtual void onDelete(const std::string &reason)=0
Called just before deletion.
static Address defaultAddress()
Returns a default address, being the IPv4 wildcard address with a zero port number.
A SimpleClient class for client objects that manage their own lifetime on the heap.
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.
A timer class template in which the timeout is delivered to the specified method. ...
virtual void onConnecting()
Called just before the connection is initiated.