MCPcopy Create free account
hub / github.com/1jehuang/jcode / send_cmd_quick

Function send_cmd_quick

scripts/test_soft_interrupt.py:50–57  ·  view source on GitHub ↗

Quick command on fresh connection.

(cmd, session_id=None, timeout=10)

Source from the content-addressed store, hash-verified

48 return False, f"Failed to parse: {data.decode()[:500]}"
49
50def send_cmd_quick(cmd, session_id=None, timeout=10):
51 """Quick command on fresh connection."""
52 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
53 sock.connect(SOCKET_PATH)
54 try:
55 return send_cmd_blocking(sock, cmd, session_id, timeout)
56 finally:
57 sock.close()
58
59def send_message_async(msg, session_id, result_queue):
60 """Send message in a thread."""

Callers 4

create_test_sessionFunction · 0.85
destroy_sessionFunction · 0.85
get_historyFunction · 0.85
queue_interruptFunction · 0.85

Calls 3

send_cmd_blockingFunction · 0.85
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected