MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / sendCommand

Function sendCommand

packages/node/src/testing/ptyScenario.ts:542–549  ·  view source on GitHub ↗
(socket: net.Socket | null, command: HarnessCommand)

Source from the content-addressed store, hash-verified

540}
541
542function sendCommand(socket: net.Socket | null, command: HarnessCommand): void {
543 if (socket === null || socket.destroyed || !socket.writable) return;
544 try {
545 socket.write(`${JSON.stringify(command)}\n`);
546 } catch {
547 // best-effort control channel
548 }
549}
550
551async function waitForHarnessExit(
552 harness: Awaited<ReturnType<typeof startPtyHarness>>,

Callers 1

runPtyScenarioFunction · 0.85

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected