27 bool bind_local_address ,
const Address & local_address ,
bool sync_dns ,
28 unsigned int secure_connection_timeout ) :
29 SimpleClient(remote_info,bind_local_address,local_address,sync_dns,secure_connection_timeout) ,
33 m_connect_timer.startTimer( 0U ) ;
40 void GNet::HeapClient::onConnectionTimeout()
46 void GNet::HeapClient::onDeletionTimeout()
52 catch( std::exception & e )
54 G_ERROR(
"HeapClientTimer::onTimeout: exception: " << e.what() ) ;
65 m_connect_timer.cancelTimer() ;
66 m_delete_timer.startTimer( 0U ) ;
67 onDeleteImp( reason ) ;
71 void GNet::HeapClient::doDeleteThis()
78 G_DEBUG(
"GNet::HeapClient::onException: exception: " << e.what() ) ;
79 doDelete( e.what() ) ;
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.
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...
A base class for classes that handle asynchronous events from the event loop.
virtual void onConnecting()
Called just before the connection is initiated.