: m_Syncing(false)
{ }
-Endpoint::~Endpoint(void)
-{
- SetClient(Stream::Ptr());
-}
-
/**
* Checks whether this endpoint is connected.
*
if (m_Client)
m_Client->Close();
- m_Thread.join();
-
m_Client = client;
if (client) {
- m_Thread = boost::thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
+ boost::thread thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
+ thread.detach();
OnConnected(GetSelf());
}
DECLARE_TYPENAME(Endpoint);
Endpoint(void);
- ~Endpoint(void);
static boost::signals2::signal<void (const Endpoint::Ptr&)> OnConnected;
static boost::signals2::signal<void (const Endpoint::Ptr&, const Dictionary::Ptr&)> OnMessageReceived;