| 1401 | } |
| 1402 | |
| 1403 | bool 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 | |
| 1418 | void ManagerService::DispatchPipeData(VmRuntimeHandle& rt, const std::string& vm_id) { |
| 1419 | while (!rt.recv_pending.empty()) { |
no test coverage detected