MCPcopy
hub / github.com/pyodide/pyodide / echo_handler

Function echo_handler

src/tests/test_python_socket.py:330–333  ·  view source on GitHub ↗
(conn, _addr)

Source from the content-addressed store, hash-verified

328 """Test creating multiple sockets simultaneously."""
329
330 def echo_handler(conn, _addr):
331 data = conn.recv(1024)
332 _, sport = conn.getsockname()
333 conn.sendall(f"Server{sport}:{data.decode()}".encode())
334
335 @run_in_pyodide
336 def run(selenium, host1, port1, host2, port2):

Callers

nothing calls this directly

Calls 2

recvMethod · 0.80
sendallMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…