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

Method client

Lib/test/test_asyncio/test_sslproto.py:323–339  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

321 self.on_eof.set_result(True)
322
323 async def client(addr):
324 await asyncio.sleep(0.5)
325
326 on_data = self.loop.create_future()
327 on_eof = self.loop.create_future()
328
329 tr, proto = await self.loop.create_connection(
330 lambda: ClientProto(on_data, on_eof), *addr)
331
332 tr.write(HELLO_MSG)
333 new_tr = await self.loop.start_tls(tr, proto, client_context)
334
335 self.assertEqual(await on_data, b'O')
336 new_tr.write(HELLO_MSG)
337 await on_eof
338
339 new_tr.close()
340
341 with self.tcp_server(serve, timeout=self.TIMEOUT) as srv:
342 self.loop.run_until_complete(

Callers

nothing calls this directly

Calls 15

ClientProtoClass · 0.70
ClientProtoFirstClass · 0.70
ClientProtoSecondClass · 0.70
sleepMethod · 0.45
create_futureMethod · 0.45
create_connectionMethod · 0.45
writeMethod · 0.45
start_tlsMethod · 0.45
assertEqualMethod · 0.45
closeMethod · 0.45
set_protocolMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected