What to do in OnDisconnect?
From: "Philippe Roger" <philippe@xxxxxxxxxxxxx>
Date: Wed, 16 Jan 2008 00:03:52 +0100 (CET)
Guys,

 

This may be a stupid question, but here it goes.

 

What can be done in the onDisconnect() handler of a connection listener,
attached to a gloox client, except terminating the client and creating
another one?  I don't see how one can reestablish the lost connection, as
ClientBase::connect() creates a parser, a connection, etc. and finally opens
the TCP connection.  But since the m_connection data member is protected, it
is all but impossible to just call connect() again on the m_connection
object to continue. and in order to call ClientBase::connect() again without
leaking at least a parser object, the ClientBase destructor must be called
first.    Am I missing something obvious?

 

Thanks!

Philippe