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

Method post_shell

source/MaaAgentServer/RemoteInstance/RemoteController.cpp:287–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287MaaCtrlId RemoteController::post_shell(const std::string& cmd, int64_t timeout)
288{
289 ControllerPostShellReverseRequest req {
290 .controller_id = controller_id_,
291 .cmd = cmd,
292 .timeout = timeout,
293 };
294 auto resp_opt = server_.send_and_recv<ControllerPostShellReverseResponse>(req);
295 if (!resp_opt) {
296 return MaaInvalidId;
297 }
298 return resp_opt->ctrl_id;
299}
300
301MaaCtrlId RemoteController::post_inactive()
302{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected