MCPcopy
hub / github.com/pyodide/pyodide / do_echo

Function do_echo

src/tests/test_python_socket.py:940–946  ·  view source on GitHub ↗
(host, port, msg)

Source from the content-addressed store, hash-verified

938 import asyncio
939
940 async def do_echo(host, port, msg):
941 reader, writer = await asyncio.open_connection(host, port)
942 writer.write(msg)
943 await writer.drain()
944 data = await reader.read(1024)
945 writer.close()
946 return data.decode()
947
948 r1, r2 = await asyncio.gather(
949 do_echo(host1, port1, b"conn1"),

Callers 1

runFunction · 0.85

Calls 3

writeMethod · 0.65
readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…