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

Function HandleConsoleEvent

src/client/client.cpp:206–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void HandleConsoleEvent(const nlohmann::json& event) {
207 if (event.value("type", "") == "console.data") {
208 const std::string bytes = StripHostTerminalQueries(HexToBytes(event.value("data_hex", "")));
209 if (!bytes.empty()) {
210 (void)::write(STDOUT_FILENO, bytes.data(), bytes.size());
211 }
212 }
213}
214
215void PrintDetached(RawTerminal& raw) {
216 raw.Restore();

Callers 1

AttachConsoleMethod · 0.85

Calls 4

StripHostTerminalQueriesFunction · 0.85
HexToBytesFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected