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

Method client

Lib/test/test_asyncio/test_streams.py:660–668  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

658 self.server = None
659
660 async def client(addr):
661 reader, writer = await asyncio.open_connection(*addr)
662 # send a line
663 writer.write(b"hello world!\n")
664 # read it back
665 msgback = await reader.readline()
666 writer.close()
667 await writer.wait_closed()
668 return msgback
669
670 messages = []
671 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))

Callers

nothing calls this directly

Calls 8

writeMethod · 0.45
readlineMethod · 0.45
closeMethod · 0.45
wait_closedMethod · 0.45
drainMethod · 0.45
get_extra_infoMethod · 0.45
start_tlsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected