Author jaswdr
Recipients asvetlov, jaswdr, jcolo, yselivanov
Date 2021-05-03.18:49:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I was able to execute the example in Debian 10 + Python 3.10+

Did you execute the server too? You need to create two files, one for the client code and one for the server code, the server as specified by the example should be something like the code below, try to save it to a file, then execute it, after that execute the client example that you have cited.

import asyncio

async def handle_echo(reader, writer):
    data = await
    message = data.decode()
    addr = writer.get_extra_info('peername')

    print(f"Received {message!r} from {addr!r}")

    print(f"Send: {message!r}")
    await writer.drain()

    print("Close the connection")

async def main():
    server = await asyncio.start_server(
        handle_echo, '', 8888)

    addr = server.sockets[0].getsockname()
    print(f'Serving on {addr}')

    async with server:
        await server.serve_forever()
Date User Action Args
2021-05-03 18:49:51jaswdrsetrecipients: + jaswdr, asvetlov, yselivanov, jcolo
2021-05-03 18:49:51jaswdrsetmessageid: <>
2021-05-03 18:49:51jaswdrlinkissue43742 messages
2021-05-03 18:49:51jaswdrcreate