forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
async def client(addr):
await asyncio.sleep(0.5)
on_data = self.loop.create_future()
on_eof = self.loop.create_future()
tr, proto = await self.loop.create_connection(
lambda: ClientProto(on_data, on_eof), *addr)
tr.write(HELLO_MSG)
new_tr = await self.loop.start_tls(tr, proto, client_context)
print(f'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {proto!r}') - оригинад
print(f'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {new_tr!r}') - какой нужен
self.assertEqual(await on_data, b'O')
new_tr.write(HELLO_MSG)
await on_eof
restored_tr = await self.loop.shutdown_tls(new_tr, proto)
self.assertEqual(await on_data, b'H')
restored_tr.write(HELLO_MSG)
await on_eof
new_tr.close()
restored_tr.close()Metadata
Metadata
Assignees
Labels
No labels