This is a simple implementation for TCP server and client. The server listens for the port 9090 of the localhost, receives messages from any connected clients, and sends them to all connected peers. The client is started with a username as an argument, reads in an infinite loop messages from the string, re-format them as "name > message\n" and send to the server. In a different async function it also waits for message from the server and prints the to the console.
Files:
aio_chat_client.py
: client implementationaio_chat_server.py
: server implementation
Dependencies: Python 3.6+ and aioconsole
Install aioconsole