#pragma once #include using ConnectOption = ConnectOption; class AsyncConnector : public AsyncConnectorDetail, public std::enable_shared_from_this { public: using Ptr = std::shared_ptr; void startWorkerThread() { AsyncConnectorDetail::startWorkerThread(); } void stopWorkerThread() { AsyncConnectorDetail::stopWorkerThread(); } void asyncConnect(const ConnectOption &option) { AsyncConnectorDetail::asyncConnect(option); } static Ptr Create() { class make_shared_enabler : public AsyncConnector { }; return std::make_shared(); } private: AsyncConnector() = default; };