This commit is contained in:
azw 2023-05-05 23:41:18 +00:00
parent ace8590f25
commit f7125c874e
2 changed files with 0 additions and 27 deletions

View File

@ -87,20 +87,6 @@ namespace a8
void AsioTcpClient::SetActive(bool active)
{
if (active) {
if (IsActive()) {
return;
}
if (worker_thread_) {
ActiveStop();
}
worker_thread_shutdown_ = false;
worker_thread_ = new std::thread(&AsioTcpClient::WorkerThreadProc, this);
} else {
if (worker_thread_) {
ActiveStop();
}
}
}
bool AsioTcpClient::ActiveStart()
@ -113,14 +99,6 @@ namespace a8
connected_ = false;
}
void AsioTcpClient::WorkerThreadProc()
{
}
void AsioTcpClient::SenderThreadProc()
{
}
void AsioTcpClient::NotifySendCond()
{
std::unique_lock<std::mutex> lk(*send_cond_mutex_);

View File

@ -30,9 +30,6 @@ namespace a8
std::shared_ptr<asio::ip::tcp::resolver> resolver_;
std::shared_ptr<asio::ip::tcp::socket> socket_;
volatile bool connected_ = false;
volatile bool sender_thread_shutdown_ = false;
volatile bool worker_thread_shutdown_ = false;
std::thread* worker_thread_ = nullptr;
std::mutex* send_buffer_mutex_ = nullptr;
SendQueueNode *top_node_ = nullptr;
SendQueueNode *bot_node_ = nullptr;
@ -42,8 +39,6 @@ namespace a8
void SetActive(bool active);
bool ActiveStart();
void ActiveStop();
void WorkerThreadProc();
void SenderThreadProc();
void NotifySendCond();
};