INNER CODE UNIT · Python

_recv

CursorTouch/Android-MCP · e2e_test.py:89

def _recv(proc, timeout=60):
    deadline = time.time() + timeout
    while True:
        if time.time() > deadline:
            raise TimeoutError(f"No response within {timeout}s")
        line = proc.stdout.readline()
        if not line:
            raise EOFError("Server stdout closed")
        line = line.strip()
        if line:
            return json.loads(line)


# ── Test ───────────────────────────────────────────────────────────────────────

def run():
    print()
    log("ENV", f"ADB binary  : {ADB or 'NOT FOUND'}", YELLOW)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…