MCPcopy Create free account
hub / github.com/78/tenbox / SendConsoleInput

Method SendConsoleInput

src/manager/manager_service.cpp:1403–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403bool ManagerService::SendConsoleInput(const std::string& vm_id, const std::string& input) {
1404 std::lock_guard<std::mutex> lock(vms_mutex_);
1405 VmRecord* vm = FindVm(vm_id);
1406 if (!vm) return false;
1407
1408 ipc::Message msg;
1409 msg.channel = ipc::Channel::kConsole;
1410 msg.kind = ipc::Kind::kRequest;
1411 msg.type = "console.input";
1412 msg.vm_id = vm_id;
1413 msg.request_id = GetTickCount64();
1414 msg.fields["data_hex"] = EncodeHex(input);
1415 return SendRuntimeMessage(*vm, msg);
1416}
1417
1418void ManagerService::DispatchPipeData(VmRuntimeHandle& rt, const std::string& vm_id) {
1419 while (!rt.recv_pending.empty()) {

Callers 1

MainWndProcFunction · 0.45

Calls 1

EncodeHexFunction · 0.70

Tested by

no test coverage detected