| 64 | } |
| 65 | |
| 66 | void RenderServiceClient::ParseMessage(const std::string& msg) { |
| 67 | tc::ServiceMessage sm; |
| 68 | try { |
| 69 | sm.ParseFromString(msg); |
| 70 | } |
| 71 | catch(...) { |
| 72 | LOGE("ParseMessage failed!"); |
| 73 | return; |
| 74 | } |
| 75 | |
| 76 | if (sm.type() == ServiceMessageType::kSrvHeartBeatResp) { |
| 77 | auto sub = sm.heart_beat_resp(); |
| 78 | auto hb_idx = sub.index(); |
| 79 | auto is_render_alive = sub.render_status() == RenderStatus::kWorking; |
| 80 | //LOGI("hb_idx: {}, is render alive: {}", hb_idx, is_render_alive); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | void RenderServiceClient::Exit() { |
| 85 | if (client_) { |