MCPcopy Create free account
hub / github.com/attermann/microReticulum / echo_handler

Function echo_handler

test_interop/python_request_receiver.py:39–47  ·  view source on GitHub ↗
(path, data, request_id, link_id, remote_identity, requested_at)

Source from the content-addressed store, hash-verified

37
38
39def echo_handler(path, data, request_id, link_id, remote_identity, requested_at):
40 ok = (data == EXPECTED_PAYLOAD)
41 print(f"[python] handler called: path={path!r} data_len={len(data)} match={ok}",
42 flush=True)
43 state["request_seen"] = True
44 state["request_ok"] = ok
45 # Echo the bytes back regardless — easier to debug a mismatch on the
46 # client side if both ends see the wrong content.
47 return data
48
49
50def on_link_established(link):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected