MCPcopy Index your code
hub / github.com/RustPython/RustPython / client

Method client

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 15

lenFunction · 0.85
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

Tested by

no test coverage detected