int Chat_Monitor::start(void) { Server_Monitor::start(); CHAT_GANG_MANAGER->start(); message_unit_.thr_create(); start_monitor_timer(); GM_ANN_MANAGER->start(); CHATER_CONTROL_MANAGER->start(); HTTP_MANAGER->init(1); HTTP_MANAGER->start(); return 0; }
bool Sentinel::start_client_connect() { pair<string, int> addr; string url; if (discover_master(addr, url) == false) return false; if (client_->connect(addr.first, addr.second, db_) == 0) { master_ip_ = addr.first; master_port_ = addr.second; sentinel_url_ = url; subscribe_sentinel_notification(url); start_monitor_timer(); return true; } return false; }