+ m_parser(&STG_CLIENT::Impl::process, this),
+ m_connected(true)
+{
+ int res = pthread_create(&m_thread, NULL, &STG_CLIENT::Impl::run, this);
+ if (res != 0)
+ throw Error("Failed to create thread: " + std::string(strerror(errno)));
+}
+
+STG_CLIENT::Impl::Impl(const Impl& rhs)
+ : m_config(rhs.m_config),
+ m_sock(connect()),
+ m_running(false),
+ m_stopped(true),
+ m_lastPing(time(NULL)),
+ m_lastActivity(m_lastPing),
+ m_callback(rhs.m_callback),
+ m_data(rhs.m_data),
+ m_parser(&STG_CLIENT::Impl::process, this),
+ m_connected(true)