The following top-level asyncio functions can be used to createĪnd work with streams: coroutine asyncio. run ( tcp_echo_client ( 'Hello World!' )) open_connection ( '127.0.0.1', 8888 ) print ( f 'Send: ' ) print ( 'Close the connection' ) writer. Import asyncio async def tcp_echo_client ( message ): reader, writer = await asyncio.
0 Comments
Leave a Reply. |