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

Method SendConsoleInput

src/daemon/runtime_manager.cpp:915–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913}
914
915bool RuntimeManager::SendConsoleInput(const std::string& vm_id, const std::vector<uint8_t>& bytes) {
916 auto session = FindSession(vm_id);
917 if (!session) return false;
918 ipc::Message message;
919 message.channel = ipc::Channel::kConsole;
920 message.kind = ipc::Kind::kRequest;
921 message.type = "console.input";
922 message.vm_id = vm_id;
923 message.fields["data_hex"] = HexEncode(bytes);
924 return SendRuntime(session, message);
925}
926
927bool RuntimeManager::SendKeyEvent(const std::string& vm_id, uint32_t key_code, bool pressed) {
928 auto session = FindSession(vm_id);

Callers 1

HandleRequestMethod · 0.45

Calls 1

HexEncodeFunction · 0.85

Tested by

no test coverage detected