This commit is contained in:
azw 2023-04-14 08:17:20 +00:00
parent 6b04c3636e
commit de11de6827

View File

@ -31,17 +31,15 @@ void Master::Init(int instance_id, const std::string& remote_ip, int remote_port
tcp_client_->on_connect = std::bind(&Master::on_connect, this, std::placeholders::_1); tcp_client_->on_connect = std::bind(&Master::on_connect, this, std::placeholders::_1);
tcp_client_->on_disconnect = std::bind(&Master::on_disconnect, this, std::placeholders::_1); tcp_client_->on_disconnect = std::bind(&Master::on_disconnect, this, std::placeholders::_1);
tcp_client_->on_socketread = std::bind(&Master::on_socketread, this ,std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); tcp_client_->on_socketread = std::bind(&Master::on_socketread, this ,std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
timer_wp_ = f8::Timer::Instance()->SetIntervalWp timer_wp_ = f8::Timer::Instance()->SetIntervalWpEx
(1000 * 9 + a8::RandEx(500, 150), (1000 * 9 + a8::RandEx(500, 150),
[] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)
{ {
if (a8::TIMER_EXEC_EVENT == event) { if (a8::TIMER_EXEC_EVENT == event) {
#if 0 CheckAlive();
Master* conn = (Master*)param.sender.GetUserData();
conn->CheckAlive();
#endif
} }
}); },
&attacher_);
} }
void Master::UnInit() void Master::UnInit()