MCPcopy Index your code
hub / github.com/python/cpython / serve

Method serve

Lib/test/test_asyncio/test_server.py:39–44  ·  view source on GitHub ↗
(reader, writer)

Source from the content-addressed store, hash-verified

37 sock.close()
38
39 async def serve(reader, writer):
40 await reader.readline()
41 main_task.cancel()
42 writer.write(b'1')
43 writer.close()
44 await writer.wait_closed()
45
46 async def main(srv):
47 async with srv:

Callers

nothing calls this directly

Calls 5

readlineMethod · 0.45
cancelMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45
wait_closedMethod · 0.45

Tested by

no test coverage detected