MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / handle_controller_wait

Method handle_controller_wait

source/MaaAgentClient/Client/AgentClient.cpp:2268–2286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2266}
2267
2268bool AgentClient::handle_controller_wait(const json::value& j)
2269{
2270 if (!j.is<ControllerWaitReverseRequest>()) {
2271 return false;
2272 }
2273 const ControllerWaitReverseRequest& req = j.as<ControllerWaitReverseRequest>();
2274 LogFunc << VAR(req) << VAR(ipc_addr_);
2275 MaaController* controller = query_controller(req.controller_id);
2276 if (!controller) {
2277 LogError << "controller not found" << VAR(req.controller_id);
2278 return false;
2279 }
2280 MaaStatus status = controller->wait(req.ctrl_id);
2281 ControllerWaitReverseResponse resp {
2282 .status = status,
2283 };
2284 send(resp);
2285 return true;
2286}
2287
2288bool AgentClient::handle_controller_connected(const json::value& j)
2289{

Callers

nothing calls this directly

Calls 1

waitMethod · 0.65

Tested by

no test coverage detected