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

Method handle_client

Lib/test/test_asyncio/test_ssl.py:215–229  ·  view source on GitHub ↗
(reader, writer)

Source from the content-addressed store, hash-verified

213 clients = []
214
215 async def handle_client(reader, writer):
216 nonlocal CNT
217
218 data = await reader.readexactly(len(A_DATA))
219 self.assertEqual(data, A_DATA)
220 writer.write(b'OK')
221
222 data = await reader.readexactly(len(B_DATA))
223 self.assertEqual(data, B_DATA)
224 writer.writelines([b'SP', bytearray(b'A'), memoryview(b'M')])
225
226 await writer.drain()
227 writer.close()
228
229 CNT += 1
230
231 async def test_client(addr):
232 fut = asyncio.Future()

Callers

nothing calls this directly

Calls 6

readexactlyMethod · 0.80
assertEqualMethod · 0.45
writeMethod · 0.45
writelinesMethod · 0.45
drainMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected